pinot
pinot copied to clipboard
Send a proper response when user queries a disabled table
We have usecases where we need to temporarily disable tables using
PUT /tables/{tableName}/state
When a user queries a disabled table, he gets the following query response which is not very descriptive.
DatabaseError: {'errorCode': 235,
'message': 'ServerSegmentMissing:\n'
'Found 2130 unavailable segments for table tableX: '
'[tablex_b0ce2b6ce16a42d6915b9d7dcd1fc551, '
'tablex_91daf87cfa0b440589db41bc7ec31209, '
'tablex_0e45edc2b06043a0852de2278857242c, '
'tablex_e82e309f8124493f8571f8785f59c261, '
'tablex_80d3fa8beb4d4e8f8c361ba5eb43f2ac, '
'tablex_6b472bedead843ad9d42042030a8105f, '
'tablex_bf1783090a9240f9b1d4ba84254152c7, '
'tablex_7767c131a19243d3a235e9f0dbddcfda, '
'tablex_86920bb0ab2e4270aeaff330d9d305d8, '
'tablex_92b1dd124cd840418e6524693ec0f5f3...]'}
We would like to request for a more descriptive query response. Something like
"Table tablex is disabled."