You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/12 15:56:17 UTC

[GitHub] [pinot] ddcprg opened a new issue, #9045: Handle poison pills in message decoders

ddcprg opened a new issue, #9045:
URL: https://github.com/apache/pinot/issues/9045

   Currently, when bad messages are ingested by Pinot these messages fail decoding and stop consumption of the stream sending the segments to `OFFLINE` state. There is no easy way to recover from this state.
   
   Most of this issues are caused during deserialisation of the binary data into the ingestion format.  Some. examples of bad messages included Avro messages with magic byte missing, JSON messages with invalid format, incompatible CSV messages.
   
   The behaviour of the decoder could be governed by config properties of for any reason the current behaviour needs to be kept as is.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] mcvsubbu commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
mcvsubbu commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1181996599

   We should not be trying to connect to schema registry during ingestion (for obvious reasons). I am not sure if decoder has an init() to get the schema from registry. If not, we can add that interface.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] mcvsubbu commented on issue #9045: Handle poison pills in message Confluent Schema Registry Avro decoder

Posted by GitBox <gi...@apache.org>.
mcvsubbu commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1183476146

   I have proposed a method in PR #9051 that will make this feature available to other streams as needed, in a well-defined way. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1182019172

   I'm fine with handling the error in other place as long as bad records can be skipped


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] kishoreg commented on issue #9045: Handle poison pills in message Confluent Schema Registry Avro decoder

Posted by GitBox <gi...@apache.org>.
kishoreg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1183324160

   sorry for the delay in pitching in. I think the right solution might be to support this at two levels
   - Decoder (convert raw payload to GenericRow) 
      * Decoder should internally handle exception, retry etc but probably not skip a record and return null instead or generic row with skip=true or something like that and adhere to the contract.. return the new offset.
   - Pinot  (convert generic row to pinot data types)
    * this should be common behavior across all decoders, if the conversion fails and if the ignoreBadRows is set to true, we should be able to continue with the next record else log the exception and stop the consumption
   
   I also dont want to block @ddcprg. If you want to just handle the first part as part of the decoder, should be fine. please make sure it still conforms to the interface contract. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] mcvsubbu commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
mcvsubbu commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1181965257

   The reason current behavior exists is to not have data loss. But then when I look at the code, it seems that the transform logic can throw exceptions and we do not stop consuming. I see no reason why decoder can also be put into the [try/catch](https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java#L524).
   
   This way, consumption will not stop unless underlying stream has a problem.
   
   @sajjad-moradi ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message Confluent Schema Registry Avro decoder

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1183341941

   @kishoreg I agree with the 2 bullet points above
   
   If we can fix `KafkaConfluentSchemaRegistryAvroMessageDecoder` for release **0.11** and then I can spend more time looking at a more generic solution that'd be great. Some of the decoders already handle the exception their own way and making the change backwards compatible may require more effort.
   
   I also need to look at the current behaviour during type conversion.
   
   We can leave this ticket open to improve on


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1183245451

   `JSONMessageDecoder` will remain as is
   
   https://github.com/apache/pinot/blob/master/pinot-plugins/pinot-input-format/pinot-json/src/main/java/org/apache/pinot/plugin/inputformat/json/JSONMessageDecoder.java#L66
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1181994533

   I was thinking of handling exceptions at decoder level because some exceptions may need retrying and others may be skipped, e.g. in the Avro decoder _"unknown magic byte"_ is a problem with the data and the record can be ignored, however a connectivity issue with the schema registry whilst retrieving the schema should be retried.
   
   Other decoders may need handling specific exceptions as per their logic too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1182009568

   There is no other way but contact the schema registry during ingestion, the schema ID is in the value payload and only known during ingestion.
   
   Messages in the same topic may refer to different schemas each and if the schema is not already cached then it needs to be retrieved - worst case the decoder will have to download a schema per message. The current code uses a caching schema registry client: https://github.com/apache/pinot/blob/master/pinot-plugins/pinot-input-format/pinot-confluent-avro/src/main/java/org/apache/pinot/plugin/inputformat/avro/confluent/KafkaConfluentSchemaRegistryAvroMessageDecoder.java#L95 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] ddcprg commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
ddcprg commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1182018046

   not necessarily, but yes best case the client download only 1 schema and keep it cache. The decoder still needs to connect to schema registry and download any schema not seen before and an error can happen then


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] mcvsubbu commented on issue #9045: Handle poison pills in message decoders

Posted by GitBox <gi...@apache.org>.
mcvsubbu commented on issue #9045:
URL: https://github.com/apache/pinot/issues/9045#issuecomment-1182015312

   Hmm... A topic will have a single schema, no? Multiple versions yes. So, given a topic, the latest version can be retrieved, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org