Hi team, I have set up pinot with auth and dedup e...
# troubleshooting
s
Hi team, I have set up pinot with auth and dedup enabled on EKS. I have a table which is ingesting data from Kafka. Below are the dedup configs in table config json:
Copy code
"routing": {
		"instanceSelectorType": "strictReplicaGroup"
	},
	"dedupConfig": {
		"dedupEnabled": true,
		"hashFunction": "NONE",
		"dedupTimeColumn": "insertion_time",
		"metadataTTL": 600000,
		"enablePreload": true
	}
When I remove the property
dedupConfig
, everything works fine. But when I keep this I face below error: 1. When I forceCommit the table via Controller UI to test Pinot, (simulating the segment commit scenario): The current segments get into
BAD
state where the segment is
ONLINE
in only 1 server and in
ERROR
state in all other servers. 2. On hovering the error state I see a generic message "testing" 3. Due to this the queries get failed with error code
305
I am not able to find any significant errors in logs but I am pasting some in the thread. Please help me out here, I am stuck here for days. PS: I am using image:
apachepinot/pinot:release-1.3.0-21-amazoncorretto
. We are having multiple controllers, brokers, and servers.
Below are the logs from different components by using grep on keywords error, exception, and dedup Server: Error:
Copy code
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.830 WARN [AppInfoParser] [HelixTaskExecutor-message_handle_thread_22] Error registering AppInfo mbean
Exception:
Copy code
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.698 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__1__20250228T1528Z] [leaderboard_entries__0__1__20250228T1528Z] Caught exception in consumer thread after stop() is invoked: java.lang.RuntimeException: Caught exception while removing segment: leaderboard_entries__0__1__20250228T1528Z of table: leaderboard_entries_REALTIME from ConcurrentMapPartitionDedupMetadataManager, ignoring the exception
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.705 INFO [local_8098 - SegmentOnlineOfflineStateModel] [HelixTaskExecutor-message_handle_thread_24] SegmentOnlineOfflineStateModel.onBecomeOnlineFromConsuming() : ZnRecord=cc9bb179-b897-4418-ba0b-bab5ff16c5d2, {CREATE_TIMESTAMP=1740756534688, ClusterEventName=IdealStateChange, EXECUTE_START_TIMESTAMP=1740756534705, EXE_SESSION_ID=1000001279f00c0, FROM_STATE=CONSUMING, MSG_ID=cc9bb179-b897-4418-ba0b-bab5ff16c5d2, MSG_STATE=read, MSG_TYPE=STATE_TRANSITION, PARTITION_NAME=leaderboard_entries__16__1__20250228T1528Z, READ_TIMESTAMP=1740756534699, RESOURCE_NAME=leaderboard_entries_REALTIME, RESOURCE_TAG=leaderboard_entries_REALTIME, RETRY_COUNT=3, SRC_NAME=pinot-controller-2.pinot-controller-headless.pinot.svc.cluster.local_9000, SRC_SESSION_ID=1000001279f00de, STATE_MODEL_DEF=SegmentOnlineOfflineStateModel, STATE_MODEL_FACTORY_NAME=DEFAULT, TGT_NAME=Server_pinot-server-0.pinot-server-headless.pinot.svc.cluster.local_8098, TGT_SESSION_ID=1000001279f00c0, TO_STATE=ONLINE}{}{}, Stat=Stat {_version=0, _creationTime=1740756534689, _modifiedTime=1740756534689, _ephemeralOwner=0}
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.705 INFO [local_8098 - SegmentOnlineOfflineStateModel] [HelixTaskExecutor-message_handle_thread_17] SegmentOnlineOfflineStateModel.onBecomeConsumingFromOffline() : ZnRecord=5da58c86-9ee8-40a6-8d05-91ee0082db3b, {CREATE_TIMESTAMP=1740756534688, ClusterEventName=IdealStateChange, EXECUTE_START_TIMESTAMP=1740756534704, EXE_SESSION_ID=1000001279f00c0, FROM_STATE=OFFLINE, MSG_ID=5da58c86-9ee8-40a6-8d05-91ee0082db3b, MSG_STATE=read, MSG_TYPE=STATE_TRANSITION, PARTITION_NAME=leaderboard_entries__16__2__20250228T1528Z, READ_TIMESTAMP=1740756534699, RESOURCE_NAME=leaderboard_entries_REALTIME, RESOURCE_TAG=leaderboard_entries_REALTIME, RETRY_COUNT=3, SRC_NAME=pinot-controller-2.pinot-controller-headless.pinot.svc.cluster.local_9000, SRC_SESSION_ID=1000001279f00de, STATE_MODEL_DEF=SegmentOnlineOfflineStateModel, STATE_MODEL_FACTORY_NAME=DEFAULT, TGT_NAME=Server_pinot-server-0.pinot-server-headless.pinot.svc.cluster.local_8098, TGT_SESSION_ID=1000001279f00c0, TO_STATE=CONSUMING}{}{}, Stat=Stat {_version=0, _creationTime=1740756534689, _modifiedTime=1740756534689, _ephemeralOwner=0}
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.705 INFO [leaderboard_entries_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_24] Adding ONLINE segment: leaderboard_entries__16__1__20250228T1528Z
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.709 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_17] Kafka commitId: 3146c6ff4a24cc24
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.709 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_17] Kafka startTimeMs: 1740756534709
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.709 WARN [AppInfoParser] [HelixTaskExecutor-message_handle_thread_17] Error registering AppInfo mbean
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=leaderboard_entries_REALTIME-leaderboard-entry-16
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:322) ~[?:?]
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1848) ~[?:?]
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:945) ~[?:?]
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.830 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_22] Kafka commitId: 3146c6ff4a24cc24
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.830 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_22] Kafka startTimeMs: 1740756534830
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.830 WARN [AppInfoParser] [HelixTaskExecutor-message_handle_thread_22] Error registering AppInfo mbean
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=leaderboard_entries_REALTIME-leaderboard-entry-0
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:322) ~[?:?]
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1848) ~[?:?]
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:945) ~[?:?]
dedup:
Copy code
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.424 INFO [WatermarkUtils] [leaderboard_entries__4__2__20250228T1528Z] Persisted watermark: 0.0 to file: /var/pinot/server/data/index/leaderboard_entries_REALTIME/ttl.watermark.partition.4.dedup
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.611 INFO [RealtimeSegmentDataManager_leaderboard_entries__16__1__20250228T1528Z] [leaderboard_entries__16__1__20250228T1528Z] Caught exception in consumer thread after stop() is invoked: java.lang.RuntimeException: Caught exception while removing segment: leaderboard_entries__16__1__20250228T1528Z of table: leaderboard_entries_REALTIME from ConcurrentMapPartitionDedupMetadataManager, ignoring the exception
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.698 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__1__20250228T1528Z] [leaderboard_entries__0__1__20250228T1528Z] Caught exception in consumer thread after stop() is invoked: java.lang.RuntimeException: Caught exception while removing segment: leaderboard_entries__0__1__20250228T1528Z of table: leaderboard_entries_REALTIME from ConcurrentMapPartitionDedupMetadataManager, ignoring the exception
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.717 INFO [WatermarkUtils] [leaderboard_entries__16__2__20250228T1528Z] Persisted watermark: 0.0 to file: /var/pinot/server/data/index/leaderboard_entries_REALTIME/ttl.watermark.partition.16.dedup
[Feb 28 2025 20:58:54 GMT+0530] pinot-server-0: 2025/02/28 15:28:54.837 INFO [WatermarkUtils] [leaderboard_entries__0__2__20250228T1528Z] Persisted watermark: 1.740716885E12 to file: /var/pinot/server/data/index/leaderboard_entries_REALTIME/ttl.watermark.partition.0.dedup
Controller: error:
Copy code
[Feb 28 2025 21:04:56 GMT+0530] pinot-controller-0: 2025/02/28 15:34:56.915 ERROR [CompletionServiceHelper] [grizzly-http-server-3] Server: Server_pinot-server-2.pinot-server-headless.pinot.svc.cluster.local_8098 returned error: 500, reason: Internal Server Error for uri: http://pinot-server-2.pinot-server-headless.pinot.svc.cluster.local:8097/debug/tables/leaderboard_entries_REALTIME
[Feb 28 2025 21:04:56 GMT+0530] pinot-controller-0: 2025/02/28 15:34:56.915 ERROR [CompletionServiceHelper] [grizzly-http-server-3] Server: Server_pinot-server-3.pinot-server-headless.pinot.svc.cluster.local_8098 returned error: 500, reason: Internal Server Error for uri: http://pinot-server-3.pinot-server-headless.pinot.svc.cluster.local:8097/debug/tables/leaderboard_entries_REALTIME
[Feb 28 2025 21:04:56 GMT+0530] pinot-controller-0: 2025/02/28 15:34:56.916 ERROR [CompletionServiceHelper] [grizzly-http-server-3] Server: Server_pinot-server-1.pinot-server-headless.pinot.svc.cluster.local_8098 returned error: 500, reason: Internal Server Error for uri: http://pinot-server-1.pinot-server-headless.pinot.svc.cluster.local:8097/debug/tables/leaderboard_entries_REALTIME
exception: Nothing dedup nothing Broker error:
Copy code
[Feb 28 2025 20:58:54 GMT+0530] pinot-broker-0: 2025/02/28 15:28:54.944 WARN [StrictReplicaGroupInstanceSelector] [ClusterChangeHandlingThread] Found unavailable instance: Server_pinot-server-3.pinot-server-headless.pinot.svc.cluster.local_8098 in instance group: [Server_pinot-server-1.pinot-server-headless.pinot.svc.cluster.local_8098, Server_pinot-server-2.pinot-server-headless.pinot.svc.cluster.local_8098, Server_pinot-server-3.pinot-server-headless.pinot.svc.cluster.local_8098] for segment: leaderboard_entries__7__1__20250228T1528Z, table: leaderboard_entries_REALTIME (IS: {Server_pinot-server-1.pinot-server-headless.pinot.svc.cluster.local_8098=ONLINE, Server_pinot-server-2.pinot-server-headless.pinot.svc.cluster.local_8098=ONLINE, Server_pinot-server-3.pinot-server-headless.pinot.svc.cluster.local_8098=ONLINE}, EV: {Server_pinot-server-1.pinot-server-headless.pinot.svc.cluster.local_8098=ERROR, Server_pinot-server-2.pinot-server-headless.pinot.svc.cluster.local_8098=ONLINE, Server_pinot-server-3.pinot-server-headless.pinot.svc.cluster.local_8098=ERROR})
exception: nothing dedup: nothing
CC: @Mayank @Kishore G @Xiang Fu @harnoor Thanks in advance
CC: @Ankit Kumar @Puneet Dhiman
Full table configs are as below:
Copy code
{
  "tableName": "leaderboard_entries",
  "tableType": "REALTIME",
  "segmentsConfig": {
    "timeColumnName": "insertion_time",
    "timeType": "MILLISECONDS",
    "schemaName": "leaderboard_entries",
    "replication": "3",
    "retentionTimeUnit": "DAYS",
    "retentionTimeValue": "90"
  },
  "query": {
    "timeoutMs": "5000"
  },
  "tenants": {},
  "tableIndexConfig": {
    "sortedColumn": [
      "score"
    ]
  },
  "fieldConfigList": [
    {
      "name": "leaderboard_id",
      "indexes": {
        "inverted": {}
      }
    },
    {
      "name": "participant_id",
      "indexes": {
        "bloom": {}
      }
    }
  ],
  "ingestionConfig": {
    "streamIngestionConfig": {
      "streamConfigMaps": [
        {
          "streamType": "kafka",
          "stream.kafka.consumer.type": "lowlevel",
          "stream.kafka.topic.name": "leaderboard-entry",
          "stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder",
          "stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
          "stream.kafka.broker.list": "<list>",
          "realtime.segment.flush.threshold.rows": "0",
          "realtime.segment.flush.threshold.time": "4h",
          "realtime.segment.flush.threshold.segment.size": "20M",
          "stream.kafka.consumer.prop.auto.offset.reset": "smallest"
        }
      ]
    }
  },
  "metadata": {
    "customConfigs": {}
  },
  "routing": {
    "instanceSelectorType": "strictReplicaGroup"
  },
  "dedupConfig": {
    "dedupEnabled": true,
    "hashFunction": "NONE",
    "dedupTimeColumn": "insertion_time",
    "metadataTTL": 600000,
    "enablePreload": true
  }
}
Table schema:
Copy code
{
  "schemaName": "leaderboard_entries",
  "dimensionFieldSpecs": [
    {
      "name": "leaderboard_id",
      "dataType": "LONG"
    },
    {
      "name": "participant_id",
      "dataType": "STRING"
    },
    {
      "name": "attempt_number",
      "dataType": "INT",
      "defaultNullValue": 1
    },
    {
      "name": "entry_meta",
      "dataType": "JSON",
      "defaultNullValue": "{}"
    }
  ],
  "metricFieldSpecs": [
    {
      "name": "score",
      "dataType": "INT",
      "defaultNullValue": 0
    }
  ],
  "dateTimeFieldSpecs": [
    {
      "name": "insertion_time",
      "dataType": "LONG",
      "format": "1:MILLISECONDS:EPOCH",
      "granularity": "1:MILLISECONDS"
    },
    {
      "name": "attempt_time",
      "dataType": "LONG",
      "format": "1:MILLISECONDS:EPOCH",
      "granularity": "1:MILLISECONDS"
    }
  ],
  "primaryKeyColumns": [
    "leaderboard_id",
    "participant_id",
    "attempt_number"
  ]
}
Can someone please help here, I am blocked on this for production?
x
hmmm, which version are you running
oh 1.3.0
can you check
leaderboard_entries__7__1__20250228T1528Z
logs in the corresponding server
And see where it throws the error
s
Thanks @Xiang Fu for the response. I tried to get help from AI (sonnet) by providing table config, schema config, and logs and it replied with below. Does it make sense or just hallucination from AI model: Confirmed Root Cause The primary issue is indeed related to JMX MBean registration conflicts during segment transitions, as evidenced by:
Copy code
WARN [AppInfoParser] Error registering AppInfo mbean
javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=leaderboard_entries_REALTIME-leaderboard-entry-0
This is happening because: 1. Your table has primary keys defined ("primaryKeyColumns": ["leaderboard_id", "participant_id", "attempt_number"]) 2. Deduplication is implicitly enabled due to these primary keys 3. The Kafka consumer client ID is not unique between segments
x
yeah, AI may not give useful info here.
this MBean from Kafka is usually not the blocking issue
but do you see more stacktraces referring to this
s
Below is the snippet around this error:
Copy code
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.661 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_16] Kafka version: 2.8.2
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.661 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_16] Kafka commitId: 3146c6ff4a24cc24
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.661 INFO [AppInfoParser] [HelixTaskExecutor-message_handle_thread_16] Kafka startTimeMs: 1740910773661
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.662 INFO [leaderboard_entries_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_17] Adding immutable segment: leaderboard_entries__0__23__20250302T1017Z
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.662 INFO [leaderboard_entries_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_17] Replaced immutable segment: leaderboard_entries__0__23__20250302T1017Z
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.662 WARN [AppInfoParser] [HelixTaskExecutor-message_handle_thread_16] Error registering AppInfo mbean
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: javax.management.InstanceAlreadyExistsException: kafka.consumer:type=app-info,id=leaderboard_entries_REALTIME-leaderboard-entry-0
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:322) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1848) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:945) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:880) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:315) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:523) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:64) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:814) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:665) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:646) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:626) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaPartitionLevelConnectionHandler.lambda$createConsumer$0(KafkaPartitionLevelConnectionHandler.java:86) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaPartitionLevelConnectionHandler.retry(KafkaPartitionLevelConnectionHandler.java:100) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaPartitionLevelConnectionHandler.createConsumer(KafkaPartitionLevelConnectionHandler.java:86) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaPartitionLevelConnectionHandler.<init>(KafkaPartitionLevelConnectionHandler.java:67) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaStreamMetadataProvider.<init>(KafkaStreamMetadataProvider.java:64) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory.createPartitionMetadataProvider(KafkaConsumerFactory.java:39) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.core.data.manager.realtime.RealtimeSegmentDataManager.createPartitionMetadataProvider(RealtimeSegmentDataManager.java:1846) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.core.data.manager.realtime.RealtimeSegmentDataManager.<init>(RealtimeSegmentDataManager.java:1634) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.core.data.manager.realtime.RealtimeTableDataManager.doAddConsumingSegment(RealtimeTableDataManager.java:534) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.core.data.manager.realtime.RealtimeTableDataManager.addConsumingSegment(RealtimeTableDataManager.java:479) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.server.starter.helix.HelixInstanceDataManager.addConsumingSegment(HelixInstanceDataManager.java:266) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.pinot.server.starter.helix.SegmentOnlineOfflineStateModelFactory$SegmentOnlineOfflineStateModel.onBecomeConsumingFromOffline(SegmentOnlineOfflineStateModelFactory.java:81) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.helix.messaging.handling.HelixStateTransitionHandler.invoke(HelixStateTransitionHandler.java:350) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.helix.messaging.handling.HelixStateTransitionHandler.handleMessage(HelixStateTransitionHandler.java:278) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:97) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:49) ~[pinot-all-1.3.0-jar-with-dependencies.jar:1.3.0-c0023da298126af6a01b802a04b66da34ba16134]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0:         at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.662 INFO [KafkaConsumer] [HelixTaskExecutor-message_handle_thread_16] [Consumer clientId=leaderboard_entries_REALTIME-leaderboard-entry-0, groupId=null] Subscribed to partition(s): leaderboard-entry-0
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.662 INFO
x
this tries to register MBean, which usually is not blocking
ack, this is kafka 2 or 3?
kafka20
s
It's 3.7.x as mentioned in AWS MSK page
x
i mean the pinot kafka plugin you are using is till kafka2 not kafka 3
s
Noob question, but how can I check that
x
in the table config, it’s using Kafka20 factory for streaming
s
Yes, Is that a problem?
Copy code
"stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder",
            "stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
x
yes the factory is
kafka20
not
kafka30
s
Should I use Apache30? as I am using Apache 3.7.x?
x
can you try this
org.apache.pinot.plugin.stream.kafka30.KafkaConsumerFactory
s
OK, let me try this.
Not working after updating the table from UI though the table config is updated. I am going to try deleting and recreating the table with Kafka30
Didn't work... 😞 But below are some more related logs if that helps:
Copy code
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [leaderboard_entries_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_17] Changing segment: leaderboard_entries__0__23__20250302T1017Z from CONSUMING to ONLINE
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [leaderboard_entries_REALTIME-RealtimeTableDataManager] [HelixTaskExecutor-message_handle_thread_16] Adding new CONSUMING segment: leaderboard_entries__0__24__20250302T1019Z
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__23__20250302T1017Z] [HelixTaskExecutor-message_handle_thread_17] State: HOLDING, transitioning from CONSUMING to ONLINE (startOffset: 104068, endOffset: 104068)
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__23__20250302T1017Z] [leaderboard_entries__0__23__20250302T1017Z] Caught exception in consumer thread after stop() is invoked: java.lang.InterruptedException: sleep interrupted, ignoring the exception
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__23__20250302T1017Z] [HelixTaskExecutor-message_handle_thread_17] Consumer thread stopped in state HOLDING
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__23__20250302T1017Z] [HelixTaskExecutor-message_handle_thread_17] Current offset 104068 matches offset in zk 104068. Replacing segment
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.652 INFO [BaseTableDataManager] [HelixTaskExecutor-message_handle_thread_16] Default time: -9223372036854775808 does not comply with format: 1:MILLISECONDS:EPOCH, using creation time: 1740910773618 as the default time for table: leaderboard_entries_REALTIME
Is there anything else which I can try? @Xiang Fu
x
this doesn’t seem right,
State: HOLDING, transitioning from CONSUMING to ONLINE (startOffset: 104068, endOffset: 104068)
it means no data in the segment
is the ingestion happening
can you try to configure the consumer offset to earliest?
s
That can be possible as I am testing the forceCommit operation so I might have committed empty segment as well. But the issue is for both empty and non-empty segments
I tried recreating topic. Now I can see
State: HOLDING, transitioning from CONSUMING to ONLINE (startOffset: 0, endOffset: 56)
so that should not be the issue.
I have S3 deepstore setup as well. Can that be the reason?
In my local setup, I don't have deepstore and auth as well. But the issue is still there. So it's something to do with dedup only. I am going to try to see if the issue exists on 1.2.0 as well
alertalertalert Seems like it's the bug of Pinot Version 1.3.0, I tried downgrading the image to
release-1.2.0-segment-lock-fix-21-amazoncorretto
and everything works fine there except below warning during table addition though dedup works fine(even better as explained later):
Copy code
{
  "unrecognizedProperties": {
    "/dedupConfig/dedupTimeColumn": "insertion_time",
    "/dedupConfig/metadataTTL": 600000
  },
  "status": "Table leaderboard_entries_REALTIME successfully added"
}
But on v1.3.0, when I forceCommit with dedup enabled, the consuming segments get into ERROR state on all the servers except one due to which segment gets into BAD state and queries get failed. We should fix this bug on priority. There's difference in deduping as well between 1.2.0 and 1.3.0 (Not confirmed but seems like so) 1. On 1.3.0, the record only gets deduped if at least one insertion record's
dedupTimeColumn
column's value is atmost
metadataTTL
older than current time. If a record with in TTL is inserted only then the deduping works. If I enter records outside TTL then they get successfully inserted even if the data is same. But if one record is encountered within TTL value then the primary key is created and all the furue records with same primary key value gets deduped. 2. Though on 1.2.0, seems like the
dedupTimeColumn
is not a thing so any record inserted into Pinot with any value gets the primary key generated irrespective of time column value and the future records with same time column value get deduped. We should fix the behaviour. CC: @Mayank @Xiang Fu @Kishore G
m
Thanks for reporting @Shivam Sharma
x
Hi Shivam, sry I forgot to follow up on this thread, as I was paying attention to the other thread you opened about dedup. So looking at the logs you posted above. I see this INFO that an exception was thrown but was ignored (safely) as it's thrown wen stopping consuming segment. So I assume it shouldn't make the segment BAD, as usually the immutable segment has replaced the consuming segment.
Copy code
[Mar 02 2025 15:49:33 GMT+0530] pinot-server-0: 2025/03/02 10:19:33.651 INFO [RealtimeSegmentDataManager_leaderboard_entries__0__23__20250302T1017Z] [leaderboard_entries__0__23__20250302T1017Z] Caught exception in consumer thread after stop() is invoked: java.lang.InterruptedException: sleep interrupted, ignoring the exception
If you still have the table and server logs around: 1. could you try find if there were any Exceptions or ERROR logs for the BAD segments e.g.
leaderboard_entries__0__0
on server-0 and server-4? such errors might cause a segment failed to be loaded, thus became BAD 2. did reset segment fix the BAD segment? (docs about reset segment) (Ive reviewed the PR raised by @Chaitanya Deepthi Chadalavada on the other thread, which makes sense as a quick fix, but I'd like to double check if there was other causes for the BAD segments, in case we missed anything thanks)
think I've reproduced the issue, and it only happened for dedup table using TTL and with RF > 1, because only slower replicas might get hit on the NPE as identified in Deepthi's PR: https://github.com/apache/pinot/pull/15178 . The winner replica did segment replacement on consuming thread which has a catch-all block which happened to catch that NPE and finish segment replacement; while slower replicas did segment replacement on Helix threads which didn't have catch-all thus failed segment loading. Fixing the NPE would fix this issue. 🙏
c
Thank you so much @Xiaobing for confirming!
s
Thanks @Xiaobing and @Chaitanya Deepthi Chadalavada Apologies for reply so late, I was occupied with office work And no, reset segment didn't fix the issue