fix(hstream): handle the `unavailable` error code
The "unavailable" error code just means that the HStream is warming up or busy, HStream guarantees that a retry will work well.
This commit is contained in:
parent
a9191f3c33
commit
7ac8715358
|
@ -309,6 +309,13 @@ do_append_records(false, Producer, Record) ->
|
||||||
msg => "HStreamDB producer sync append success",
|
msg => "HStreamDB producer sync append success",
|
||||||
record => Record
|
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 ->
|
{error, Reason} = Err ->
|
||||||
?tp(
|
?tp(
|
||||||
hstreamdb_connector_query_return,
|
hstreamdb_connector_query_return,
|
||||||
|
|
Loading…
Reference in New Issue