From 0a8dd7b6da46fda792ac9044ad1c666e399fbfa3 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 21 Apr 2023 16:00:34 -0400 Subject: [PATCH] Try to disable `snappy` compression on variables; it breaks everything XD --- piker/service/marketstore.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/piker/service/marketstore.py b/piker/service/marketstore.py index 8d99b7cd..c5337c5c 100644 --- a/piker/service/marketstore.py +++ b/piker/service/marketstore.py @@ -89,6 +89,12 @@ stale_threshold: 5 enable_add: true enable_remove: false +# SUPER DUPER CRITICAL to address a super weird issue: +# https://github.com/pikers/piker/issues/443 +# seems like "variable compression" is possibly borked +# or snappy compression somehow breaks easily? +disable_variable_compression: true + triggers: - module: ondiskagg.so on: "*/1Sec/OHLCV" @@ -464,14 +470,20 @@ class Storage: limit=limit, ) - try: - result = await client.query(params) - except purerpc.grpclib.exceptions.UnknownError as err: - # indicate there is no history for this timeframe - log.exception( - f'Unknown mkts QUERY error: {params}\n' - f'{err.args}' - ) + for i in range(3): + try: + result = await client.query(params) + break + except purerpc.grpclib.exceptions.UnknownError as err: + if 'snappy' in err.args: + await tractor.breakpoint() + + # indicate there is no history for this timeframe + log.exception( + f'Unknown mkts QUERY error: {params}\n' + f'{err.args}' + ) + else: return {} # TODO: it turns out column access on recarrays is actually slower: