Skip to content

Commit e99c9b7

Browse files
committed
chore: fix
1 parent 18dcdaa commit e99c9b7

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

packages/cubejs-backend-native/src/orchestrator.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
use crate::node_obj_deserializer::JsValueDeserializer;
22
use crate::transport::MapCubeErrExt;
33
use cubeorchestrator::query_message_parser::QueryResult;
4-
use cubeorchestrator::query_result_transform::{
5-
DBResponsePrimitive, DBResponseValue, RequestResultData, RequestResultDataMulti,
6-
TransformedData,
7-
};
4+
use cubeorchestrator::query_result_transform::{DBResponsePrimitive, DBResponseValue, RequestResultData, RequestResultDataMulti,
5+
TransformedData};
86
use cubeorchestrator::transport::{JsRawData, TransformDataRequest};
97
use cubesql::compile::engine::df::scan::{FieldValue, ValueObject};
108
use cubesql::CubeError;
@@ -259,12 +257,12 @@ pub fn get_cubestore_result(mut cx: FunctionContext) -> JsResult<JsValue> {
259257
let js_row = JsObject::new(&mut cx);
260258
for (key, value) in result.columns.iter().zip(row.iter()) {
261259
let js_key = cx.string(key);
260+
262261
let js_value: Handle<'_, JsValue> = match value {
263262
DBResponseValue::Primitive(DBResponsePrimitive::Null) => cx.null().upcast(),
264263
// For compatibility, we convert all primitives to strings
265264
other => cx.string(other.to_string()).upcast(),
266265
};
267-
268266
js_row.set(&mut cx, js_key, js_value)?;
269267
}
270268
Ok(js_row)

packages/cubejs-cubestore-driver/src/CubeStoreQueueDriver.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
252252
const payload = JSON.parse(row.payload);
253253

254254
if (row.extra) {
255+
console.log(row.extra, typeof row.extra);
256+
console.log(payload, typeof payload);
257+
console.log(row.payload, typeof row.payload);
255258
return Object.assign(payload, JSON.parse(row.extra));
256259
}
257260

packages/cubejs-query-orchestrator/test/benchmarks/QueueBench.abstract.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ export function QueryQueueBenchmark(name: string, options: QueryQueueTestOptions
138138
} else {
139139
counters.events[event] = 1;
140140
}
141+
142+
if (event.includes('error')) {
143+
console.log(event, _params);
144+
}
141145
},
142146
queueDriverFactory,
143147
...options
@@ -159,7 +163,8 @@ export function QueryQueueBenchmark(name: string, options: QueryQueueTestOptions
159163
const progressIntervalId = setInterval(() => {
160164
console.log('running', {
161165
...counters,
162-
processingPromisses: processingPromisses.length
166+
processingPromisses: processingPromisses.length,
167+
benchSettings,
163168
});
164169
}, 1000);
165170

@@ -177,18 +182,25 @@ export function QueryQueueBenchmark(name: string, options: QueryQueueTestOptions
177182

178183
const queueId = crypto.randomBytes(12).toString('hex');
179184
const running = (async () => {
180-
await queue.executeInQueue('query', queueId, {
181-
// eslint-disable-next-line no-bitwise
182-
payload: 'a'.repeat(benchSettings.queuePayloadSize)
183-
}, 1, {
185+
try {
186+
await queue.executeInQueue('query', queueId, {
187+
// eslint-disable-next-line no-bitwise
188+
payload: {
189+
large_str: 'a'.repeat(benchSettings.queuePayloadSize)
190+
},
191+
orphanedTimeout: 120
192+
}, 1, {
184193
stageQueryKey: 1,
185194
requestId: 'request-id',
186195
spanId: 'span-id'
187-
});
196+
});
197+
} catch (e) {
198+
console.error(e);
199+
}
188200

189201
counters.queueResolved++;
190202

191-
// loosing memory for result
203+
// losing memory for a result
192204
return null;
193205
})();
194206

0 commit comments

Comments
 (0)