diff --git a/qa/testcases/bug-repros/fb-1371-datagen.yaml b/qa/testcases/bug-repros/fb-1371-datagen.yaml new file mode 100644 index 000000000..b4ab21d15 --- /dev/null +++ b/qa/testcases/bug-repros/fb-1371-datagen.yaml @@ -0,0 +1,57 @@ +fields: + - name: "id" + type: uint + step: 1 + distribution: "sequential" + min: 1 + max: 200 + - name: "segid" + type: "int" # (default IntField) + min: 0 + max: 3 + distribution: "zipfian" + s: 1.1 + v: 5.1 + - name: "ts" + type: "timestamp" + min_date: 2006-01-02T15:04:05.001Z # RFC3339Nano + max_date: 2022-01-02T15:04:05.001Z # RFC3339Nano + distribution: "increasing" # only "increasing" is supported right now + min_step_duration: "1ms" + max_step_duration: "200ms" + - name: "lastupdated" + type: "timestamp" + min_date: 2006-01-02T15:04:05.001Z # RFC3339Nano + max_date: 2022-01-02T15:04:05.001Z # RFC3339Nano + distribution: "increasing" # only "increasing" is supported right now + min_step_duration: "1ms" + max_step_duration: "200ms" + - name: "slice" + type: "uint-set" # (default IDArrayField) + min: 0 + max: 35000 + distribution: "zipfian" + s: 1.1 + v: 5.1 + min_num: 1 + max_num: 50 + +idk_params: + primary_key_config: + field: "id" + fields: + segid: + - type: "ID" + ts: + - type: "RecordTime" + layout: "2006-01-02T15:04:05Z" + epoch: 1970-01-01T00:00:00.0Z + name: "na" + - type: "Timestamp" + layout: "2006-01-02T15:04:05Z" + epoch: 1970-01-01T00:00:00.0Z + name: "last_update" + granularity: "s" + slice: + - type: "IDArray" + time_quantum: "D" diff --git a/qa/testcases/bug-repros/fb-1371-test.sh b/qa/testcases/bug-repros/fb-1371-test.sh new file mode 100755 index 000000000..2c4fb4cef --- /dev/null +++ b/qa/testcases/bug-repros/fb-1371-test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +ifErr() { + RESCODE=$? + if [[ $RESCODE != 0 ]]; then + echo $1 + exit $RESCODE + fi +} + +/data/datagen_linux_arm64 -s custom --custom-config=./fb-1371-datagen.yaml --pilosa.index=fb1371 --pilosa.batch-size=100 --pilosa.hosts=$1 +ifErr "datagenning fb1371" + +RES1=$( curl $1/index/fb1371/query -d 'Max(ts)' | jq '.results[0].timestampValue' ) +ifErr "getting Max 1" + +RES2=$( curl $1/index/fb1371/query -d 'Max(ts)' | jq '.results[0].timestampValue' ) +ifErr "getting Max 2" + +if [[ $RES1 != $RES2 ]]; then + echo "different Max after two calls" + echo "first: $RES1" + echo "second: $RES2" + exit 1 +fi