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

sql/stats: fix inject/restore of partial stats not creating merged stats #127252

Commits on Jul 16, 2024

  1. sql/stats: fix inject/restore of partial stats not creating merged stats

    Previously, JSON statistics would not include the statistic ID. This
    meant that restoring statement bundles would recreate stats with new
    IDs, breaking the statisticID/fullStatisticID relationship between full
    & partial stats and fail to recreate merged stats as a result. This
    commit adds the statistic ID to JSONStatistic and recreates stats with
    the same ID if present when injected. Allows for merged stats to be
    correctly recreated following inject/restore of full and partial stats.
    
    Fixes: cockroachdb#94101
    
    See also: cockroachdb#125950
    
    Release note (bug fix): Fixed a bug that prevented merged stats from
    being created after injecting stats or recreating statement bundles.
    This would occur when the injected stats/statement bundle contained
    related full and partial statistics.
    Uzair5162 committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4ece712 View commit details
    Browse the repository at this point in the history