Repository navigation
fix: make legacy Business ID allocation explicit and collision-safe - #157
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #137.
Deprecates the old BusinessIdGenerator APIs while retaining their existing PREFIXyyyyMMddNNNN format and independent sequence namespace. Legacy allocation now uses context.businessDate(), rejects digit-range exhaustion, and uses an optimistic conditional update. Legacy JDBC schema creation is explicit via context.ensureSchema(); the constructor and allocation path no longer create tables.
Local verification: JDK 21 mvn -q test; ./scripts/verify-examples.sh; mvn -q spotbugs:check -pl !examples/conformance/lib,!examples/conformance. All exited 0.
Compatibility note: external callers of the deprecated API have not been inventoried, so this PR does not remove it or merge its sequence state with BusinessIdService.