Skip to content

Commit 72b01c2

Browse files
Yerazeclaude
andauthored
fix: traceroute duplication caused by bypassing deduplication logic (#2387)
meshtasticManager.ts called databaseService.traceroutes.insertTraceroute() (the repository directly), bypassing the deduplication logic in databaseService.insertTraceroute() which checks for pending traceroute requests and updates them instead of inserting duplicates. This caused every traceroute response to create a new record even when a pending request record already existed, resulting in duplicate entries in traceroute history. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4194d90 commit 72b01c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/meshtasticManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5147,7 +5147,9 @@ class MeshtasticManager {
51475147
createdAt: Date.now()
51485148
};
51495149

5150-
await databaseService.traceroutes.insertTraceroute(tracerouteRecord);
5150+
// Use DatabaseService.insertTraceroute() (not repo directly) for deduplication:
5151+
// It checks for pending traceroute requests and updates them instead of inserting duplicates
5152+
databaseService.insertTraceroute(tracerouteRecord);
51515153

51525154
// Store traceroute hop count as telemetry for Smart Hops tracking
51535155
// Hop count is route.length + 1 (intermediate hops + final hop to destination)

0 commit comments

Comments
 (0)