-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Problem
neptuneSnapshotNodesQuery and neptuneSnapshotEdgesQuery fetch all records including soft-deleted ones (deleted_at IS NOT NULL), then filter client-side in the Snapshot() method to count active vs deleted records.
At scale this transfers significantly more data than needed from Neptune to the application.
Expected behavior
The snapshot queries should either:
- Filter out soft-deleted records server-side with
WHERE n.deleted_at IS NULL(if deleted records aren't needed in the snapshot), or - Use two separate queries — one for active records and one for counts — to avoid transferring deleted record payloads
Affected code
internal/graph/store_neptune.go—neptuneSnapshotNodesQuery(lines 905–926),neptuneSnapshotEdgesQuery(lines 928–943),Snapshot()(lines 281–345)
Reactions are currently unavailable