horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Add new error code instead of `Table Not Found` for client routing table refresh When shard is opening

Open MichaelLeeHZ opened this issue 1 year ago • 1 comments

Describe This Problem

Recently CeresDb always return Table Not Found In different error cases. Maybe it is useful to add some new error codes to distinguish.

Proposal

  • return Shard_Not_Open before open a shard
  • return Shard Is Opening when shard is opening

Additional Context

No response

MichaelLeeHZ avatar Mar 15 '23 03:03 MichaelLeeHZ

This problem may bring massive route requests because java sdk will refresh its routing tables when any error happens, which will overwhelm CeresMeta because there is no cache on the CeresDB server.

In order to solve this problem, two actions can be adopted:

  • Return a specific error telling the client whether to refresh its routing table (this is actually this issue).
  • Add routing cache to avoid fowarding all route requests to the ceresmeta (another issue #738 will be filed to track this problem).

ShiKaiWi avatar Mar 15 '23 06:03 ShiKaiWi