Hi, We're on v0.90.3, and just find the SQL query ...
# general
k
Hi, We're on v0.90.3, and just find the SQL query doesn't work as expected
Copy code
SELECT host_name, SUM(healthy) AS health_sum
  FROM ssh_alive
  GROUP BY host_name
I expect it would have a single grouped record for every single host_name, but it turns out to be multiple records for a same host_name:
the host_name seems correct
h
🫠, for each query we have one unique trace_id(like below figure), can you do follower step 1. run the wrong result query to get one trace_id 2. use this trace_id to get all openobserve's log(all logs from ingester and querier that have the trace_id in step 1) 3. send to me, let me check before you do above, please set the env ZO_PRINT_KEY_SQL=true ZO_RESULT_CACHE_ENABLED=false
k
@Huaijin Hao 4 servers
h
thank you, i checking
this is not the original sql, in our ui, when you do the search, we will have two api call, the first is for you write sql, the second is for count(*). the log you give to me is for count(*), can you help share the first one? and look like you do not set
ZO_PRINT_KEY_SQL=true
k
I curl for the query before. This time I use the web ui
h
Hi @Karl , thanks for you check but you still not set the
ZO_PRINT_KEY_SQL=true
, i need this to check the physical plan
k
confirmed that I have
ZO_PRINT_KEY_SQL=true
set already
my settings:
Copy code
export ZO_MAX_MEMORY_PERCENTAGE=80

export ZO_MAX_CONCURRENT_QUERIES=1

export ZO_DISK_CACHE_MAX_SIZE=25000

export ZO_USAGE_REPORTING_ENABLED=true
export ZO_USAGE_REPORT_TO_OWN_ORG=true

export RUST_LOG=info

export ZO_RESULT_CACHE_ENABLED=false
export ZO_PRINT_KEY_SQL=true
@Huaijin Hao please review the updated logs. The logs sent before only grep the trace id, now I include logs at the same second
h
from the logs, look like you run each querier in single node. set this will fix you issue
Copy code
ZO_FEATURE_SINGLE_NODE_OPTIMIZE_ENABLED=false
👀 1
k
nice. it works. Thanks. but how can find this config in the document?
h
this env is current not document, it is used for our debug HA mode issue in single mode... we think you can't set up a cluster with ZO_LOCAL_MODE=true. what is value for below two env ZO_LOCAL_MODE ZO_NODE_ROLE
k
ZO_LOCAL_MODE=false and we don't set any ZO_NODE_ROLE, since we found it didn't work at the time we set the cluster
h
got it, thank you
🙏 1