MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / commit

Method commit

nodedb/src/control/sequence/gap_free.rs:131–136  ·  view source on GitHub ↗

Commit a reservation: the number is now permanent. Releases the per-sequence lock so the next caller can proceed.

(&self, handle: &ReservationHandle)

Source from the content-addressed store, hash-verified

129 /// Commit a reservation: the number is now permanent.
130 /// Releases the per-sequence lock so the next caller can proceed.
131 pub fn commit(&self, handle: &ReservationHandle) {
132 let locks = self.locks.lock().unwrap_or_else(|p| p.into_inner());
133 if let Some(lock) = locks.get(&handle.sequence_key) {
134 self.unlock_sequence(lock);
135 }
136 }
137
138 /// Rollback a reservation: decrement the counter, recycle the number.
139 /// Releases the per-sequence lock so the next caller can proceed.

Callers 15

put_custom_typeMethod · 0.45
delete_custom_typeMethod · 0.45
put_userMethod · 0.45
delete_userMethod · 0.45
record_wal_tombstoneMethod · 0.45
enqueue_l2_cleanupMethod · 0.45
remove_l2_cleanupMethod · 0.45
put_scheduleMethod · 0.45
delete_scheduleMethod · 0.45
put_streaming_mvMethod · 0.45

Calls 3

lockMethod · 0.80
unlock_sequenceMethod · 0.80
getMethod · 0.45

Tested by 4

reserve_commitFunction · 0.36
sequential_reservationsFunction · 0.36
concurrent_serializationFunction · 0.36