qryn icon indicating copy to clipboard operation
qryn copied to clipboard

When creating tables, create them with a storage policy if env var is set

Open danjenkins opened this issue 1 year ago • 5 comments

If you don't create the tables with the right policy to start with, changing them later becomes more difficult.

2023.11.30 14:07:14.189999 [ 43 ] {dca12b4b-2a04-4259-a3f7-50f4cfdfc862} <Error> DynamicQueryHandler: Code: 36. DB::Exception: New storage policy externalshall contain volumes of the old storage policydefault. (BAD_ARGUMENTS), Stack trace (when copying this message, always include the lines below):
{"level":20,"time":1701352745340,"pid":26,"hostname":"qryn-f7cb56bd9-xkgvh","name":"qryn","msg":"Altering storage policy: external"}
ALTER TABLE time_series  MODIFY SETTING storage_policy='external'
{"level":50,"time":1701352745363,"pid":26,"hostname":"qryn-f7cb56bd9-xkgvh","name":"qryn","err":"Error: Request failed with status code 400\nResponse: [400] undefined\nError: Request failed with status code 400\n    at createError (/app/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/app/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:526:35)\n    at endReadableNT (node:internal/streams/readable:1589:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","msg":"Error starting qryn"}

danjenkins avatar Nov 30 '23 14:11 danjenkins

@danjenkins Do you prefer all the tables to have the storage policy or just the heaviest ones?

akvlad avatar Nov 30 '23 14:11 akvlad

@akvlad I think If I've passed in a STORAGE_POLICY env var I'd expect them all to have that policy

danjenkins avatar Nov 30 '23 14:11 danjenkins

@danjenkins should be fixed in v3.0.21 feel free to recheck.

akvlad avatar Dec 04 '23 17:12 akvlad

@danjenkins any chance to confirm if this solves your challenge?

lmangani avatar Jan 15 '24 10:01 lmangani

Yes I'll confirm tomorrow!

danjenkins avatar Jan 15 '24 10:01 danjenkins

@danjenkins is it fixed?

gaby avatar Mar 21 '24 02:03 gaby

Yup! Sorry forgot to report back

danjenkins avatar Mar 21 '24 06:03 danjenkins

Closing as completed

lmangani avatar Mar 21 '24 09:03 lmangani