Closed marlonpatrick closed 2 months ago
I'm not sure. But as long as the epoch stays the same, say 1/1/2020, and considering that the clock doesn't (normally) go backwards, there shouldn't be any problems related to time. The reason for this is that the time component has a fixed number of bits.
I think the question is how the NODE_ID_CALCULATED_BY_IP is calculated and distributed to the TSID generators. You have to be sure that each NODE_ID_CALCULATED_BY_IP is associated to only one TSIDs generator. TSID generators rely on this "coordination" of node IDs.
For example, if I want change:
FROM: TsidCreator.getTsid256().toLong()
TO: TsidFactory.newInstance1024(NODE_ID_CALCULATED_BY_IP).create().toLong()