mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-13 22:36:57 +00:00
The synchronous FlushRegions handler wrapped the error returned by the flush task into Unexpected before building the reply. InstructionError then only copied the Unexpected status code and the default NonRetryable hint, so metasrv could not tell a transient flush failure from a non-retryable one. Return the task error unchanged so its status code and retry hint reach FlushRegionReply, and rebuild the reply message with the same debug chain the previous wrapper produced to keep the diagnostics unchanged. Add handler-level tests covering RegionBusy, RegionNotFound and Unexpected task errors under both FailFast and TryAll. Signed-off-by: WenyXu <wenymedia@gmail.com>