File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,10 @@ pub async fn dynamometer(
83
83
. collect ( ) ;
84
84
85
85
let io_operation_time = Instant :: now ( ) ;
86
- region. region_write ( & writes, JobId ( 1000 ) , false ) . await ?;
86
+ let pre = PrecomputedWrite :: from_writes ( & writes) ;
87
+ region
88
+ . region_write_pre ( & writes, & pre, JobId ( 1000 ) , false )
89
+ . await ?;
87
90
88
91
total_io_time += io_operation_time. elapsed ( ) ;
89
92
io_operations_sent += num_writes;
Original file line number Diff line number Diff line change @@ -327,7 +327,10 @@ pub async fn downstairs_import<P: AsRef<Path> + std::fmt::Debug>(
327
327
}
328
328
329
329
// We have no job ID, so it makes no sense for accounting.
330
- region. region_write ( & writes, JobId ( 0 ) , false ) . await ?;
330
+ let pre = PrecomputedWrite :: from_writes ( & writes) ;
331
+ region
332
+ . region_write_pre ( & writes, & pre, JobId ( 0 ) , false )
333
+ . await ?;
331
334
332
335
assert_eq ! ( nblocks, pos) ;
333
336
assert_eq ! ( total, pos. bytes( ) ) ;
@@ -1164,9 +1167,13 @@ where
1164
1167
* │ │ │ │
1165
1168
* ┌────▼──┴─┐ message ┌┴──────┐ job ┌┴────────┐
1166
1169
* │resp_loop├──────────►│pf_task├─────────►│ dw_task │
1167
- * └─────────┘ channel └──┬────┘ channel └▲────────┘
1170
+ * └──┬───▲──┘ channel └──┬────┘ channel └▲────────┘
1171
+ * │ │ │ │
1172
+ * defer│ │oneshot │ │
1173
+ * ┌▼───┴┐ │ │
1174
+ * │rayon│ add│work new│work
1175
+ * └─────┘ │ │
1168
1176
* │ │
1169
- * add│work new│work
1170
1177
* per-connection │ │
1171
1178
* ========================= │ ============== │ ===============
1172
1179
* shared state ┌──▼────────────────┴────────────┐
Original file line number Diff line number Diff line change @@ -764,6 +764,10 @@ impl Region {
764
764
Ok ( result)
765
765
}
766
766
767
+ /// Perform a region write, without precomputed data
768
+ ///
769
+ /// This is only allowed in unit tests
770
+ #[ cfg( test) ]
767
771
#[ instrument]
768
772
pub async fn region_write (
769
773
& mut self ,
@@ -821,7 +825,7 @@ impl Region {
821
825
let extent = self . get_opened_extent_mut ( * eid) ;
822
826
let ( writes, ctxs) = batched_writes. get ( eid) . unwrap ( ) ;
823
827
extent
824
- . write ( job_id, & writes, & ctxs, only_write_unwritten)
828
+ . write ( job_id, writes, ctxs, only_write_unwritten)
825
829
. await ?;
826
830
}
827
831
You can’t perform that action at this time.
0 commit comments