graph/db: expose KVStore locations where a reset is needed

This commit passes no-op reset callbacks to various places where they
are needed in the KVStore. Upcoming commits will replace the no-ops by
adding reset params to the methods that require it.
This commit is contained in:
Elle Mouton committed 2025-07-15 11:23:26 +02:00
1 parent 302551ade0
commit 57d4ce0f9b
2 files changed
+78 -32

No files matched your search

+6
View File
@@ -206,6 +206,9 @@ func migrateNodes(ctx context.Context, kvBackend kvdb.Backend,
return sqldb.CompareRecords(
node, migratedNode, fmt.Sprintf("node %x", pub),
)
}, func() {
// No reset is needed since if a retry occurs, the entire
// migration will be retried from the start.
})
if err != nil {
return fmt.Errorf("could not migrate nodes: %w", err)
@@ -384,6 +387,9 @@ func migrateChannelsAndPolicies(ctx context.Context, kvBackend kvdb.Backend,
}
return nil
}, func() {
// No reset is needed since if a retry occurs, the entire
// migration will be retried from the start.
})
if err != nil {
return fmt.Errorf("could not migrate channels and policies: %w",