mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
5833 Fix Deadlock when using shardByURL of VMAgent (#5834)
This commit is contained in:
parent
4b2ba16e27
commit
24154450e7
1 changed files with 1 additions and 1 deletions
|
@ -436,12 +436,12 @@ func pushBlockToRemoteStorages(rwctxs []*remoteWriteCtx, tssBlock []prompbmarsha
|
||||||
// Push sharded data to remote storages in parallel in order to reduce
|
// Push sharded data to remote storages in parallel in order to reduce
|
||||||
// the time needed for sending the data to multiple remote storage systems.
|
// the time needed for sending the data to multiple remote storage systems.
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(len(rwctxs))
|
|
||||||
for i, rwctx := range rwctxs {
|
for i, rwctx := range rwctxs {
|
||||||
tssShard := tssByURL[i]
|
tssShard := tssByURL[i]
|
||||||
if len(tssShard) == 0 {
|
if len(tssShard) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
wg.Add(1)
|
||||||
go func(rwctx *remoteWriteCtx, tss []prompbmarshal.TimeSeries) {
|
go func(rwctx *remoteWriteCtx, tss []prompbmarshal.TimeSeries) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
rwctx.Push(tss)
|
rwctx.Push(tss)
|
||||||
|
|
Loading…
Reference in a new issue