fix(ft): use conservative timeouts for S3 uploader calls
This commit is contained in:
parent
d36c2c2928
commit
cc3275b389
|
@ -79,7 +79,7 @@ start_export(_Options, Transfer, Filemeta) ->
|
||||||
-spec write(export_st(), iodata()) ->
|
-spec write(export_st(), iodata()) ->
|
||||||
{ok, export_st()} | {error, term()}.
|
{ok, export_st()} | {error, term()}.
|
||||||
write(#{pid := Pid} = ExportSt, IoData) ->
|
write(#{pid := Pid} = ExportSt, IoData) ->
|
||||||
case emqx_s3_uploader:write(Pid, IoData) of
|
case emqx_s3_uploader:write(Pid, IoData, emqx_ft_conf:store_segment_timeout()) of
|
||||||
ok ->
|
ok ->
|
||||||
{ok, ExportSt};
|
{ok, ExportSt};
|
||||||
{error, _Reason} = Error ->
|
{error, _Reason} = Error ->
|
||||||
|
@ -89,7 +89,7 @@ write(#{pid := Pid} = ExportSt, IoData) ->
|
||||||
-spec complete(export_st(), emqx_ft:checksum()) ->
|
-spec complete(export_st(), emqx_ft:checksum()) ->
|
||||||
ok | {error, term()}.
|
ok | {error, term()}.
|
||||||
complete(#{pid := Pid} = _ExportSt, _Checksum) ->
|
complete(#{pid := Pid} = _ExportSt, _Checksum) ->
|
||||||
emqx_s3_uploader:complete(Pid).
|
emqx_s3_uploader:complete(Pid, emqx_ft_conf:assemble_timeout()).
|
||||||
|
|
||||||
-spec discard(export_st()) ->
|
-spec discard(export_st()) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
Loading…
Reference in New Issue