Merge pull request #11299 from lafirest/hs

fix(hstream): handle the `unavailable` error code
This commit is contained in:
lafirest 2023-07-19 17:47:30 +08:00 committed by GitHub
commit d4550f911c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -309,6 +309,13 @@ do_append_records(false, Producer, Record) ->
msg => "HStreamDB producer sync append success",
record => Record
});
%% the HStream is warming up or buzy, something are not ready yet, retry after a while
{error, {unavailable, _} = Reason} ->
{error,
{recoverable_error, #{
msg => "HStreamDB is warming up or buzy, will retry after a moment",
reason => Reason
}}};
{error, Reason} = Err ->
?tp(
hstreamdb_connector_query_return,