We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3400d80 commit 2f565c3Copy full SHA for 2f565c3
apps/webapp/app/services/runsReplicationService.server.ts
@@ -145,8 +145,10 @@ export class RunsReplicationService {
145
const key = `${item.event}_${item.run.id}`;
146
const existingItem = merged.get(key);
147
148
- // keep the run with the higher version (latest)
149
- if (!existingItem || item._version > existingItem._version) {
+ // Keep the run with the higher version (latest)
+ // and take the last occurrence for that version.
150
+ // Items originating from the same DB transaction have the same version.
151
+ if (!existingItem || item._version >= existingItem._version) {
152
merged.set(key, item);
153
}
154
0 commit comments