Refactor counter increment sites for TwoPhaseCounter.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-24 00:15:33 +00:00
parent 05bb1f4ac7
commit 0fcb072239
21 changed files with 129 additions and 117 deletions

View File

@@ -154,9 +154,9 @@ pub async fn add_to_device_event(
event_type: &str,
content: serde_json::Value,
) {
let count = self.services.globals.next_count().unwrap();
let count = self.services.globals.next_count();
let key = (target_user_id, target_device_id, count);
let key = (target_user_id, target_device_id, *count);
self.db.todeviceid_events.put(
key,
Json(json!({