sharding token extension in identity key

Issue #4137 resolved
Michael Bayer
repo owner created an issue

consider the sharded setup where primary tables in each DB include a shard-unique primary key, but then those tables branch off into sub-tables that do not. In order to represent these objects in an identity map, we would need to support an additional token within the identity key.

Generation of identity key is present against the row in -> instances, so at that point some token from the query context would be pulled (more likely a callable function or event so that this can be generic), and then at the instance level users would need to define some attribute or callable that can retrieve the shard identifier for an instance.

another approach would be that the whole identity key is generated from user-defined callables that receive either a row in context or an instance.

Comments (3)

  1. Michael Bayer reporter

    Add an identity_token to the identity key

    For the purposes of assisting with sharded setups, add a new member to the identity key that can be customized. this allows sharding across databases where the primary key space is shared.

    Change-Id: Iae3909f5d4c501b62c10d0371fbceb01abda51db Fixes: #4137

    → <<cset 50d9f1687a6e>>

  2. Log in to comment