pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Set error messages in helix for state transition failues

Open xiangfu0 opened this issue 5 years ago • 6 comments

It can help access the errors from the controller UI without searching server logs for segment errors or broker/server instances go into error status.

xiangfu0 avatar Feb 01 '21 20:02 xiangfu0

can you please elaborate "set error messages in helix"

kishoreg avatar Feb 01 '21 20:02 kishoreg

If I understand what @fx19880617 is saying, it is to provide an API in the controller to retrieve Helix state transition error messages and perhaps history as well. I concur that it is a useful feature to have. Once we have the servers and the error messages, we can look into the server for a specific cause.

mcvsubbu avatar Feb 01 '21 21:02 mcvsubbu

Yes, right now we only know that segment in error state from external view. The goal is to also set the stacktrace for segment loading and easy for users to retrieve it.

xiangfu0 avatar Feb 01 '21 22:02 xiangfu0

Got it. One thing to keep in mind is that state transition error messages get cleaned up automatically by Helix. we should probably do something like this

  • each server stores the error message/segment status in segmentDataManager
  • exposes an api to get the status along with message
  • controller can invoke the server api on demand

Please don't save the error stacktrace in Helix

kishoreg avatar Feb 02 '21 06:02 kishoreg

I think Helix preserves the error stack/messages for a few days? State stored in segmentDataManager can go away on restart. I think there is value in retrieving helix messages (if they exist) as well. On a recent issue in Linkedin, it turned out that the state transitions did not succeed and caused a performance hit on pinot servers. The errors went away upon restart. I can totally imagine an admin restarting the servers to get the system up & running.

It may make sense to have an API gather all debug information available and output it as a a blob of text. We can enhance this as we feel like, without regarding to backward compat, etc.

curl controller:port/tables/{tableName}/debugState 1> saved 2>&1

can be done before any restart is attempted. This can also retrieve states from each of the servers that have segments for the table.

mcvsubbu avatar Feb 02 '21 17:02 mcvsubbu

Hi, from experience, this will be a really useful feature to me. I would love to give it a try if nobody is working on it.

dharakk avatar Feb 18 '21 03:02 dharakk