@@ -26,18 +26,41 @@ pub(in crate::data::executor) struct KvInsertOnConflictUpdateParams<'a> {
2626 pub surrogate : Surrogate ,
2727}
2828
29+ /// Parameters for a KV point `GET`.
30+ pub ( in crate :: data:: executor) struct KvGetParams < ' a > {
31+ pub did : u64 ,
32+ pub tid : u64 ,
33+ pub collection : & ' a str ,
34+ pub key : & ' a [ u8 ] ,
35+ pub rls_filters : & ' a [ u8 ] ,
36+ pub surrogate_ceiling : Option < u32 > ,
37+ }
38+
39+ /// Parameters for a KV point write (`PUT` / `INSERT` / `INSERT ... IF ABSENT`).
40+ pub ( in crate :: data:: executor) struct KvWriteParams < ' a > {
41+ pub did : u64 ,
42+ pub tid : u64 ,
43+ pub collection : & ' a str ,
44+ pub key : & ' a [ u8 ] ,
45+ pub value : & ' a [ u8 ] ,
46+ pub ttl_ms : u64 ,
47+ pub surrogate : Surrogate ,
48+ }
49+
2950impl CoreLoop {
30- #[ allow( clippy:: too_many_arguments) ]
3151 pub ( in crate :: data:: executor) fn execute_kv_get (
3252 & self ,
3353 task : & ExecutionTask ,
34- did : u64 ,
35- tid : u64 ,
36- collection : & str ,
37- key : & [ u8 ] ,
38- rls_filters : & [ u8 ] ,
39- surrogate_ceiling : Option < u32 > ,
54+ params : KvGetParams < ' _ > ,
4055 ) -> Response {
56+ let KvGetParams {
57+ did,
58+ tid,
59+ collection,
60+ key,
61+ rls_filters,
62+ surrogate_ceiling,
63+ } = params;
4164 debug ! ( core = self . core_id, %collection, "kv get" ) ;
4265
4366 // Read-your-own-writes: an in-transaction get consults this
@@ -122,18 +145,20 @@ impl CoreLoop {
122145 }
123146 }
124147
125- #[ allow( clippy:: too_many_arguments) ]
126148 pub ( in crate :: data:: executor) fn execute_kv_put (
127149 & mut self ,
128150 task : & ExecutionTask ,
129- did : u64 ,
130- tid : u64 ,
131- collection : & str ,
132- key : & [ u8 ] ,
133- value : & [ u8 ] ,
134- ttl_ms : u64 ,
135- surrogate : Surrogate ,
151+ params : KvWriteParams < ' _ > ,
136152 ) -> Response {
153+ let KvWriteParams {
154+ did,
155+ tid,
156+ collection,
157+ key,
158+ value,
159+ ttl_ms,
160+ surrogate,
161+ } = params;
137162 debug ! ( core = self . core_id, %collection, "kv put" ) ;
138163
139164 // Memory budget check: reject new PUTs when over budget.
@@ -186,18 +211,20 @@ impl CoreLoop {
186211 /// are pinned to one Data Plane core (vshard routing), and the core
187212 /// loop runs ops serially — no other writer can slip between the
188213 /// probe and the put on the same key.
189- #[ allow( clippy:: too_many_arguments) ]
190214 pub ( in crate :: data:: executor) fn execute_kv_insert (
191215 & mut self ,
192216 task : & ExecutionTask ,
193- did : u64 ,
194- tid : u64 ,
195- collection : & str ,
196- key : & [ u8 ] ,
197- value : & [ u8 ] ,
198- ttl_ms : u64 ,
199- surrogate : Surrogate ,
217+ params : KvWriteParams < ' _ > ,
200218 ) -> Response {
219+ let KvWriteParams {
220+ did,
221+ tid,
222+ collection,
223+ key,
224+ value,
225+ ttl_ms,
226+ surrogate,
227+ } = params;
201228 debug ! ( core = self . core_id, %collection, "kv insert" ) ;
202229
203230 if self . kv_engine . is_over_budget ( ) {
@@ -258,18 +285,20 @@ impl CoreLoop {
258285
259286 /// SQL `INSERT ... ON CONFLICT DO NOTHING` semantics: write if absent,
260287 /// silent no-op on duplicate. No error on conflict.
261- #[ allow( clippy:: too_many_arguments) ]
262288 pub ( in crate :: data:: executor) fn execute_kv_insert_if_absent (
263289 & mut self ,
264290 task : & ExecutionTask ,
265- did : u64 ,
266- tid : u64 ,
267- collection : & str ,
268- key : & [ u8 ] ,
269- value : & [ u8 ] ,
270- ttl_ms : u64 ,
271- surrogate : Surrogate ,
291+ params : KvWriteParams < ' _ > ,
272292 ) -> Response {
293+ let KvWriteParams {
294+ did,
295+ tid,
296+ collection,
297+ key,
298+ value,
299+ ttl_ms,
300+ surrogate,
301+ } = params;
273302 debug ! ( core = self . core_id, %collection, "kv insert-if-absent" ) ;
274303
275304 if self . kv_engine . is_over_budget ( ) {
@@ -323,7 +352,6 @@ impl CoreLoop {
323352 /// decode the stored value, apply the updates (with `EXCLUDED`
324353 /// resolving to the would-be-inserted row), and write the merged
325354 /// result back.
326- #[ allow( clippy:: too_many_arguments) ]
327355 pub ( in crate :: data:: executor) fn execute_kv_insert_on_conflict_update (
328356 & mut self ,
329357 task : & ExecutionTask ,
0 commit comments