Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set
allowed_ids
in PrimaryKeyGenerator
based on values from the n…
…ew `shard_allocation` table Summary: For databases where a row exists in `shard_allocation`, we will only generate IDs within the assigned ID range. For databases where no row exists, we will generate "non-sharded" IDs within the reserved range of [1, 45035996273704959]. As mentioned in D50845178 and P868925994, all production IDs are below 2^37, which is well within this range, so we should not be worried about failures due to this restriction. This is for the [Tribbles Database Sharding](https://docs.google.com/document/d/1WvxuGBPqh0ZPIcFzbUUcEKJcKT6i1P9ZqRiG3Wr7GT4) project. Reviewed By: fahndrich Differential Revision: D50938904 fbshipit-source-id: adb918ce6beafa4956238a323a71d6c14c1b194a
- Loading branch information