Skip to content

Commit b48e29b

Browse files
committed
fix(heartbeats): Also order by __name__ in case of duplicate timestamps
1 parent db62cf0 commit b48e29b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/heartbeats-processor/src/remote_db.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ pub async fn fetch_heartbeat_chunk(
203203

204204
q.for_all(conditions)
205205
})
206-
.order_by([("createTime", FirestoreQueryDirection::Ascending)])
206+
.order_by([
207+
("createTime", FirestoreQueryDirection::Ascending),
208+
("__name__", FirestoreQueryDirection::Ascending),
209+
])
207210
.limit(FIRESTORE_BATCH_SIZE);
208211

209212
let mut batch: Vec<HeartbeatEntry> = query.obj().query().await?;

0 commit comments

Comments
 (0)