Comments (4)
Added a drift tolerance of 10 seconds to preserve monotonicity when the system clock is adjusted by NTP after a small clock drift or when the system clock jumps back by 1 second due to leap second.
The counter is incremented when the current time:
- is the same as the previous time;
- has moved backwards up to 10 seconds.
The timestamp is also incremented if the counter is exceeded. Now the TSID factory doesn't have to wait for the next millisecond when the counter overruns. Therefore, there is no longer any speed limit for generating TSIDs.
from tsid-creator.
Released version v4.2.0.
from tsid-creator.
Reopen for final adjustment.
from tsid-creator.
Released version v4.2.1.
from tsid-creator.
Related Issues (20)
- Version 4.0.0 HOT 2
- Provide OSGI support HOT 2
- Compare internal field as unsigned integers HOT 1
- Increment the counter when the random function returns null or empty HOT 1
- Add support for RandomGenerator in Java 17 HOT 2
- Optimize comparison and hash HOT 2
- Rewrite docs HOT 1
- Add a fast method to generate identifiers HOT 1
- Add the system property and environment variable to configure the node count HOT 1
- Add simple format methods HOT 1
- Make the Tsid class extensible HOT 1
- Suggestions for generating a node ID on Kubernetes HOT 7
- Question: Is the ThreadLocalRandom approach considerably safe on a clustered environment? HOT 5
- Reduce synchronization scope when generating the TSID HOT 5
- Fix sync HOT 1
- Using the Tsid.encode method in the JDK 8 environment HOT 3
- ArrayIndexOutOfBoundsException on input with multiple bytes for a character HOT 1
- TSID as database primary keys in multi tenant environment HOT 2
- Add benchmark code to compare TSID with UUID HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsid-creator.