The specification for this is at: https://w3c.github.io/IndexedDB/#key-generator-construct. The maximum value is 2^53 (9007199254740992). As the spec notes:
As long as key generators are used in a normal fashion this limit will not be a problem. If you generate a new key 1000 times per second day and night, you won’t run into this limit for over 285000 years.
There is no way to reset the key generator for an object store.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…