Remove sequential ID generation and SyncAllCounters (bd-c7af, bd-8e05, bd-4c74)
- Removed SyncAllCounters() and all call sites (already no-op with hash IDs) - Removed AllocateNextID() and getNextIDForPrefix() - sequential ID generation - Removed collision remapping logic in internal/storage/sqlite/collision.go - Removed rename collision handling in internal/importer/importer.go - Removed branch-merge example (collision resolution no longer needed) - Updated EXTENDING.md to remove counter sync examples These were all deprecated code paths for sequential IDs that are obsolete with hash-based IDs. Hash ID collisions are handled by extending the hash, not by remapping to new sequential IDs.
This commit is contained in:
10
EXTENDING.md
10
EXTENDING.md
@@ -631,10 +631,7 @@ if err := store.CreateIssues(ctx, issues, "import"); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// If you used explicit IDs, sync counters to prevent collisions
|
||||
if err := store.SyncAllCounters(ctx); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
// REMOVED (bd-c7af): SyncAllCounters - no longer needed with hash IDs
|
||||
```
|
||||
|
||||
### Performance Comparison
|
||||
@@ -695,10 +692,7 @@ func ImportFromExternal(externalIssues []ExternalIssue) error {
|
||||
return fmt.Errorf("batch create failed: %w", err)
|
||||
}
|
||||
|
||||
// Sync counters since we used explicit IDs
|
||||
if err := store.SyncAllCounters(ctx); err != nil {
|
||||
return fmt.Errorf("counter sync failed: %w", err)
|
||||
}
|
||||
// REMOVED (bd-c7af): SyncAllCounters - no longer needed with hash IDs
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user