Hey Team, We have a realtime table where consumpti...
# troubleshooting
r
Hey Team, We have a realtime table where consumption has stopped suddenly in 9/12 consuming segments with following error message during segment commit.
Copy code
java.lang.IllegalStateException: Integer overflow detected. Try to use raw version 3 or 4, reduce targetDocsPerChunk or targetMaxChunkSize
Based on deep dive I have made following changes for encodedSketch column which is the only metric column in table with no dictionary enabled since it contains bytes.
Copy code
"fieldConfigList": [
    {
      "name": "encodedSketch",
      "encodingType": "RAW",
      "indexes": {
        "forward": {
          "rawIndexWriterVersion": 4
        }
      }
    }
  ]
After making the changes and force committing the segments, still the segments are not getting committed. Please let me know what can be the issue here.
m
This means that a single change is becoming greater than 2GB (integer address space). Is your single sketch > 2GB? If so, try to reduce that.
r
I checked the data and do not think this is the case. Also, KLL sketch of 17bn elements is ~6KB. Can there be any other issue? https://datasketches.apache.org/docs/KLL/KLLAccuracyAndSize.html
m
Well, if you are getting the exact same error, then a chunk is > 2 GB for sure. If not one entry, may be total entries in the chunk are amounting to that. Perhaps set
targetMaxChunkSize
to 2MB or some smaller value and try
r
I tried setting targetMaxChunkSize, still the segment is not getting committed. The above error is last present ~12 hours ago when consumption stopped. After that only below warnings are there in logs for the segment. I have tried pausing and resuming consumption but these segments are not getting committed.
Copy code
2025/01/08 17:17:11.744 WARN [RealtimeSegmentDataManager_metric_numerical_agg_1H__11__157__20250107T1745Z] [grizzly-http-server-19] Cannot fetch stream offset with criteria OffsetCriteria{_offsetType=LARGEST, _offsetString='largest'} for clientId metric_numerical_agg_1H_REALTIME-D3NumericalSketchTopic-11 and partitionGroupId 11 with maxWaitTime 5000
java.lang.IllegalStateException: This consumer has already been closed.
        at org.apache.kafka.clients.consumer.KafkaConsumer.acquireAndEnsureOpen(KafkaConsumer.java:2432) ~[pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar:1.3.0-SNAPSHOT-f9ea80f30bb0ca91c7529ebaec93dc7d69c4d493]
m
When you try to commit does it fail in segment build?
r
When force committing segments now, I only have consumer closed exception around that time. Integer overflow exception has last occurred ~12 hours ago during segment build.
Copy code
2025/01/08 03:28:12.582 ERROR [RealtimeSegmentDataManager_metric_numerical_agg_1H__11__157__20250107T1745Z] [metric_numerical_agg_1H__11__157__20250107T1745Z] Could not build segment
java.lang.IllegalStateException: Integer overflow detected. Try to use raw version 3 or 4, reduce targetDocsPerChunk or targetMaxChunkSize
The consumer closed exception is occurring during segment commit. The logs are for segment reload.
Copy code
2025/01/08 19:02:51.356 INFO [HelixInstanceDataManager] [segment-refresh-thread-0] Reloading (force committing) consuming segment: metric
_numerical_agg_1H__11__157__20250107T1745Z in table: metric_numerical_agg_1H_REALTIME
2025/01/08 19:02:51.358 INFO [HelixInstanceDataManager] [HelixTaskExecutor-message_handle_thread_51] Reloaded segments with metadata in t
able: metric_numerical_agg_1H_REALTIME. Duration: 13
2025/01/08 19:02:52.416 INFO [KafkaConsumer] [metric_numerical_agg_backfill_5M__7__37__20241112T2108Z] [Consumer clientId=metric_numerica
l_agg_backfill_5M_REALTIME-D3NumericalSketchBackfillTopic-7, groupId=metric_numerical_agg_backfill_5M] Seeking to offset 82506855 for par
tition D3NumericalSketchBackfillTopic-7
2025/01/08 19:02:52.417 INFO [KafkaConsumer] [metric_numerical_agg_backfill_5M__1__37__20241112T2108Z] [Consumer clientId=metric_numerica
l_agg_backfill_5M_REALTIME-D3NumericalSketchBackfillTopic-1, groupId=metric_numerical_agg_backfill_5M] Seeking to offset 82483853 for par
tition D3NumericalSketchBackfillTopic-1
r
The debugging steps listed in this doc might be of help to you. Pls try to follow and see if it helps.
r
Thanks, will try this!
Thanks for the help on this Mayank & Ragesh! Doc was super helpful, forward index for encodedSketch was reaching 2GB limit. Have reset the segments to resolve the issue.
r
Glad to know that it helped. Thanks @Chaitanya Deepthi Chadalavada who brought this to my notice.