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

querylog migration failing on 0006_sorting_key_change #6186

Closed
chipzzz opened this issue Aug 7, 2024 · 3 comments
Closed

querylog migration failing on 0006_sorting_key_change #6186

chipzzz opened this issue Aug 7, 2024 · 3 comments

Comments

@chipzzz
Copy link

chipzzz commented Aug 7, 2024

self-hosted/ helm-chart Sentry Version 23.12.1
externalclickhouse version: 23.4.1
singleNode=False
SNUBA_SETTINGS=distributed
SENTRY_DISTRIBUTED_CLICKHOUSE_TABLES = True

{"module": "snuba.migrations.runner", "event": "Running migration: 0006_sorting_key_change", "severity": "info", "timestamp": "2024-08-07T21:50:55.799090Z"}
Traceback (most recent call last):
  File "/usr/local/bin/snuba", line 33, in <module>
    sys.exit(load_entry_point('snuba', 'console_scripts', 'snuba')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/snuba/snuba/cli/migrations.py", line 114, in migrate
    runner.run_all(
  File "/usr/src/snuba/snuba/migrations/runner.py", line 219, in run_all
    self._run_migration_impl(
  File "/usr/src/snuba/snuba/migrations/runner.py", line 299, in _run_migration_impl
    migration.forwards(context, dry_run)
  File "/usr/src/snuba/snuba/migrations/migration.py", line 95, in forwards
    op.execute(logger)
  File "/usr/src/snuba/snuba/migrations/operations.py", line 539, in execute
    self.__func(logger)
  File "/usr/src/snuba/snuba/snuba_migrations/querylog/0006_sorting_key_change.py", line 96, in forwards
    update_querylog_table(connection, database)
  File "/usr/src/snuba/snuba/snuba_migrations/querylog/0006_sorting_key_change.py", line 41, in update_querylog_table
    assert new_create_table_statement.count(new_timestamp_type) == 0
@chipzzz
Copy link
Author

chipzzz commented Aug 7, 2024

@dbanda

@chipzzz
Copy link
Author

chipzzz commented Aug 7, 2024

Upgrading Clickhouse to 23.8.3(highest I can go with my helm chart not go past 23.8.11) helped but getting another issue - ClickHouse/ClickHouse#35518 - I can manually intervene by adjusting the script for now just painful.

@chipzzz
Copy link
Author

chipzzz commented Aug 8, 2024

Disabling
<internal_replication>false</internal_replication>
<compression>false</compression>
Seems to help in the version I was having trouble with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant