Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primary_index_fieldno_map is not cached #243

Open
ligurio opened this issue Nov 26, 2021 · 0 comments
Open

primary_index_fieldno_map is not cached #243

ligurio opened this issue Nov 26, 2021 · 0 comments

Comments

@ligurio
Copy link
Member

ligurio commented Nov 26, 2021

local function extract_from_index(primary_key, primary_index_parts, sharding_key_as_index_obj)
    dev_checks('table', 'table', 'table')

    local primary_index_fieldno_map = utils.get_index_fieldno_map(primary_index_parts)

We re-calculate this map on each request. At least, please, mark it as possible speed up headroom: we can cache this value.

As an option, we can do this right in the shadring key definitions fetching code and get rid of the primary_index_parts argument in sharding_key_module.extract_from_pk().

#181 (comment)

ligurio added a commit that referenced this issue Nov 26, 2021
Describe functionality and current limitations (#212, #213, #219, #243)
with custom sharding key in CHANGELOG and README.

Closes #166

Reviewed-by: Oleg Babin <[email protected]>
Reviewed-by: Alexander Turenko <[email protected]>
Co-authored-by: Georgy Moiseev <[email protected]>
ligurio added a commit that referenced this issue Nov 26, 2021
Describe functionality and current limitations (#212, #213, #219, #243)
with custom sharding key in CHANGELOG and README.

Closes #166

Reviewed-by: Oleg Babin <[email protected]>
Reviewed-by: Alexander Turenko <[email protected]>
Co-authored-by: Georgy Moiseev <[email protected]>
ligurio added a commit that referenced this issue Nov 27, 2021
Describe functionality and current limitations (#212, #213, #219, #243)
with custom sharding key in CHANGELOG and README.

Thanks to Oleg Babin (@olegrok) and Alexander Turenko (@Totktonada) for
help with feature implementation.

Closes #166

Reviewed-by: Oleg Babin <[email protected]>
Reviewed-by: Alexander Turenko <[email protected]>
Co-authored-by: Georgy Moiseev <[email protected]>
ligurio added a commit that referenced this issue Nov 27, 2021
Describe functionality and current limitations (#212, #213, #219, #243)
with custom sharding key in CHANGELOG and README.

Thanks to Oleg Babin (@olegrok) and Alexander Turenko (@Totktonada) for
help with feature implementation.

Closes #166

Reviewed-by: Oleg Babin <[email protected]>
Reviewed-by: Alexander Turenko <[email protected]>
Co-authored-by: Georgy Moiseev <[email protected]>
@kyukhin kyukhin added the teamE label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants