Hi Guys , need guidance with one of issue we are f...
# troubleshooting
p
Hi Guys , need guidance with one of issue we are facing . We are testing upsert use case on realtime table , where realtime table has 20 million records and we are publishing additional 50million records. We have query loop running which basically validates total record count while upsert is in progress , we expect this query to return total count of 20 million consistently. Real time table has replication factor 2. We noticed that if one of our server goes down (We have 5 servers), pinot dont return result (i.e our count(*)query returns numberofSegmentsmatched=0, totaldocs=0, segmentqueried=0 etc ) for about 30secs before giving expected result. i.e 20 million. Also noticed when server comes back up total count is inconsistent for some time before returning expected result. Table remains in BAD state but keeps serving query with expected result after sometime. Our Table config "REALTIME": {    "tableName": "sometable",    "tableType": "REALTIME",    "segmentsConfig": {      "schemaName": "someschema",      "timeColumnName": "AuditDateTimeUTC",      "allowNullTimeValue": false,      "replication": "1",      "replicasPerPartition": “2”    },    "tenants": {      "broker": "DefaultTenant",      "server": "DefaultTenant",      "tagOverrideConfig": {}    },    "tableIndexConfig": {      "invertedIndexColumns": [],      "rangeIndexColumns": [],      "rangeIndexVersion": 1,      "autoGeneratedInvertedIndex": false,      "createInvertedIndexDuringSegmentGeneration": false,      "sortedColumn": [],      "bloomFilterColumns": [],      "loadMode": "MMAP",      "noDictionaryColumns": [some columns],      "onHeapDictionaryColumns": [],      "varLengthDictionaryColumns": [],      "enableDefaultStarTree": false,      "enableDynamicStarTreeCreation": false,      "aggregateMetrics": false,      "nullHandlingEnabled": false,      "streamConfigs": {        "streamType": "kafka",        "stream.kafka.topic.name": "sometopic",        "stream.kafka.broker.list": "host:9092",        "stream.kafka.consumer.type": "lowlevel",        "stream.kafka.hlc.bootstrap.server": "host:9092",        "stream.kafka.consumer.prop.auto.offset.reset": "largest",        "stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",        "stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder",        "realtime.segment.flush.threshold.rows": "0",        "realtime.segment.flush.threshold.size": "0",        "realtime.segment.flush.autotune.initialRows": “3000000",        "realtime.segment.flush.threshold.time": "24h",        "realtime.segment.flush.threshold.segment.size": “500M”      }    },    "metadata": {},    "quota": {},    "routing": {      "instanceSelectorType": "strictReplicaGroup"    },    "query": {},    "upsertConfig": {      "mode": "FULL",      "comparisonColumn": "AuditDateTimeUTC",      "hashFunction": "NONE"    },    "ingestionConfig": {},    "isDimTable": false  } }
m
Do you know why the server went down? Was there an expensive query issued?
When table is shown in
BAD
state in console, does the external view show all segments ONLINE/CONSUMING (if so, it is more of a UI bug).
p
we stopped server as part of test case to check how replication behaves when upsert is in progress
m
Oh ok. When server is restarted, it can take a bit to load all segments (depending on how many there are), which will explain the inconsistent result.
Are you running with replication of 1? A better test would be to run with replication > 1 and then stop one server to see if results are still correct.
p
replication 2 .... actually we are more worried abt scenarion where pinot stops responding for 30 sec or so after server goes down
m
That is not an expected.
p
we were expecting to continue to get results even if server goes down as replication is set to 2 ..could it be any config issue?
m
I don’t think Pinot is expected to stop responding if one of the servers is down. There might be some other issue going on there.
What is the query you are running?
p
select count(*) ...
m
Hmm, that should definitely not time out. How do you stop the server?
Can you stop the server, then check external view to see if it shows as offline, and then issue the query?
p
Hi Mayank , In external view its doent show any segment offline ...all segments are in consuming state to start with before stopping server , each segment having 2 consuming servers (replication 2) and we see only one server is consuming state for one of the segments after one of server is stopped .... but noticed it does take time for external view to update ...could it be reason why we dont get any result for time external view is updating ...
k
@Prashant Korade there are two types of failure scenarios
• hard failure - network, disk fail etc • graceful stop - restarting the
in case of hard failure, for example kill -9, we rely on session time configured with ZK to know that the node failed - this is 30 seconds by default.
in case of graceful shutdown, it will be immediate because the node disconnects from the cluster before shutting down
p
Thanks Kishore ... for this test case ...we stopped server ... by kill -9 ...
so as this was hard failure , its expected not to get any result for about 30 secs
tried with grace full stop , its does return expected result..
k
yeah, you can control the session timeout and reduce it to 15 sec or 10 sec
p
Thanks @Mayank @Kishore G for your inputs ...
m
Thanks for confirming it works @Prashant Korade