Consuming is not a bad state to be in per se. What...
# troubleshooting
m
Consuming is not a bad state to be in per se. What flush threshold have you configured? That dictates when segments get committed
s
@Mayank flush threshold is set to 1h or 200Mb here is the whole table config:
Copy code
{
  "REALTIME": {
    "tableName": "cns_notification_content_REALTIME",
    "tableType": "REALTIME",
    "segmentsConfig": {
      "schemaName": "cns_notification_content",
      "replication": "1",
      "retentionTimeUnit": "DAYS",
      "retentionTimeValue": "15",
      "replicasPerPartition": "1",
      "timeColumnName": "ingestionTime",
      "minimizeDataMovement": false,
      "segmentPushType": "APPEND"
    },
    "tenants": {
      "broker": "DefaultTenant",
      "server": "CX",
      "tagOverrideConfig": {}
    },
    "tableIndexConfig": {
      "columnMajorSegmentBuilderEnabled": true,
      "noDictionaryColumns": [],
      "streamConfigs": {
        "streamType": "kafka",
        "stream.kafka.topic.name": "",
        "stream.kafka.broker.list": "",
        "stream.kafka.consumer.type": "lowlevel",
        "stream.kafka.consumer.prop.auto.offset.reset": "smallest",
        "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.segment.rows": "0",
        "realtime.segment.flush.threshold.time": "1h",
        "realtime.segment.flush.threshold.segment.size": "200M"
      },
      "rangeIndexVersion": 2,
      "autoGeneratedInvertedIndex": false,
      "createInvertedIndexDuringSegmentGeneration": false,
      "loadMode": "MMAP",
      "enableDefaultStarTree": false,
      "enableDynamicStarTreeCreation": false,
      "aggregateMetrics": false,
      "nullHandlingEnabled": false,
      "optimizeDictionary": false,
      "optimizeDictionaryForMetrics": false,
      "noDictionarySizeRatioThreshold": 0.85,
      "invertedIndexColumns": [],
      "bloomFilterColumns": [],
      "onHeapDictionaryColumns": [],
      "rangeIndexColumns": [],
      "sortedColumn": [],
      "varLengthDictionaryColumns": []
    },
    "metadata": {},
    "quota": {},
    "routing": {},
    "query": {},
    "fieldConfigList": [
      {
        "name": "log.analytics_payload",
        "encodingType": "DICTIONARY",
        "indexTypes": [],
        "indexes": {
          "json": {}
        },
        "tierOverwrites": null
      }
    ],
    "ingestionConfig": {
      "continueOnError": true,
      "rowTimeValueCheck": false,
      "segmentTimeValueCheck": true,
      "filterConfig": {
        "filterFunction": ""
      },
      "transformConfigs": [
        {
          "columnName": "ingestionTime",
          "transformFunction": "now()"
        }
      ],
      "complexTypeConfig": {
        "delimiter": "."
      }
    },
    "isDimTable": false
  }
}
a
@Mayank In this table we noticed that one server had much lower number of segments count compared to other servers in the tenant. The server was not dead neither had any error logs - @Sameer is expecting that commit call to controller was not going through and thats why the segments kept being in consuming state and not online.
m
You can grep for segment name in the server log to see what all was happening to it and if there were any related errors
a
@Sameer Lets wait if the issue gets replicated again. @Mayank We will wait for this to happen again. Do you think what other things can cause this?
m
I’d say just look at the log this time it will tell you what happened
s
@Anand Kr Shaw, I too faced the same issue with my REALTIME table ingesting events from Kinesis shards, one faulty segment was there in my server and was not being committed even though I hit the forceCommit api for that segment, the status was still showing as Consuming instead of Online... Only after server restart and force committing the segment, my pinot table started ingesting data for that shard, till then the data in that shard was not being ingested by Pinot... No errors for that segment though, in my server logs @Mayank
m
Can you share the log from the server that was trying to commit but fail? Hard to imagine why it won't log anything.
s
No Mayank, when I hit the
forceCommit
API for that segment, the api sent me 200 success (I haven't captured the logs at this step), but after when I check the
debug/segments
API for that segment, that segment was still showing as
CONSUMING
... so I restarted the server, then forceCommitting that segment worked for, the debug/segments API gave me
ONLINE
status for that segment Will try to capture the logs when this happens again...
m
Yes, please share details if you run into this again.
s
Hi @Mayank, faced the same issue... even after forceCommitting a segment, the segment is still in CONSUMING state... controller log:
Copy code
2025-01-31T14:42:48.960747687Z Sent 4 force commit messages for table: kyc_journey_events_REALTIME segments: [kyc_journey_events__66__282__20250129T1334Z]

2025-01-31T14:42:48.968630249Z Handled request from 10.x.x.x POST http://<hostIp>:80/tables/kyc_journey_events/forceCommit?segments=kyc_journey_events__66__282__20250129T1334Z, content-type null status code 200 OK
server log:
Copy code
2025-01-31T14:42:48.956901333Z The latency of message ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 is 275 ms
2025-01-31T14:42:48.961379792Z Scheduling message ce9c5708-e224-491b-a2bb-2b60e1e1b3c0: kyc_journey_events_REALTIME:, null->null
2025-01-31T14:42:48.961509113Z Submit task: ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 to pool: java.util.concurrent.ThreadPoolExecutor@4c413919[Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 2]
2025-01-31T14:42:48.961721552Z Message: ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 handling task scheduled
2025-01-31T14:42:48.961730512Z 89 END:INVOKE CallbackHandler 0, /PinotCluster/INSTANCES/Server_pinot-server-17.pinot-server.pinot.svc.cluster.local_8098/MESSAGES listener: org.apache.helix.messaging.handling.HelixTaskExecutor@f5cff7c type: CALLBACK Took: 8ms
2025-01-31T14:42:48.961760969Z handling task: ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 begin, at: 1738334568961


2025-01-31T14:42:48.961929888Z Handling force commit message for table kyc_journey_events_REALTIME segments [kyc_journey_events__66__282__20250129T1334Z]


2025-01-31T14:42:48.961984600Z Message ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 completed.
2025-01-31T14:42:48.965332600Z Delete message ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 from zk!
2025-01-31T14:42:48.965345728Z message finished: ce9c5708-e224-491b-a2bb-2b60e1e1b3c0, took 4
2025-01-31T14:42:48.965360415Z Message: ce9c5708-e224-491b-a2bb-2b60e1e1b3c0 (parent: null) handling task for kyc_journey_events_REALTIME: completed at: 1738334568965, results: true. FrameworkTime: 4 ms; HandlerTime: 0 ms.
debug/segments/kyc_journey_events_REALTIME/kyc_journey_events__66__282__20250129T1334Z
API response:
h
Are all servers hosting replicas of this segment healthy? What response do you see when you hit forceCommitStatus API?
s
Yes servers are healthy, and I see 200OK for that API
m
cc: @Sajjad Moradi ^^
s
Hi @Mayank One observation is that, my server's CPU was spiked for sometime and then some of the segments in that server are not getting committed automatically, so I need to forceCommit those segments and then pinot is able to ingest the data properly... till then the data is not being consumed...
The reason for the spike from what I observed was: • If someone queries through Query Console without a LIMIT or not adding a timestamp filter, then the query is doing a full table scan (which is expected) and the CPU spike is shooting up... But after the recovery from that CPU spike, few of the segments in those servers were still in CONSUMING state eventhough they should have been committed earlier...
m
For MSQE, yes it is postgres compliant behavior. I think due to CPU usage the commit message was backlogged and would have been processed when there was cpu available.
s
Haan ri8 @Mayank, but the prblm here is, even when the CPU is available, the server is not picking the backlogged commits and the segments are stuck in the CONSUMING state forever until the server restart happens...
m
That seems like an error situation, see if any errors or exceptions in the log