mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
Revert "azureblob: fix deadlock with --max-connections with InvalidBlockOrBlob errors"
This reverts commit 0c1902cc6037d81eaf95e931172879517a25d529. This turns out not to be sufficient so we need a better approach
This commit is contained in:
@@ -2797,8 +2797,6 @@ func (o *Object) clearUncommittedBlocks(ctx context.Context) (err error) {
|
|||||||
blockList blockblob.GetBlockListResponse
|
blockList blockblob.GetBlockListResponse
|
||||||
properties *blob.GetPropertiesResponse
|
properties *blob.GetPropertiesResponse
|
||||||
options *blockblob.CommitBlockListOptions
|
options *blockblob.CommitBlockListOptions
|
||||||
// Use temporary pacer as this can be called recursively which can cause a deadlock with --max-connections
|
|
||||||
pacer = fs.NewPacer(ctx, pacer.NewS3(pacer.MinSleep(minSleep), pacer.MaxSleep(maxSleep), pacer.DecayConstant(decayConstant)))
|
|
||||||
)
|
)
|
||||||
|
|
||||||
properties, err = o.readMetaDataAlways(ctx)
|
properties, err = o.readMetaDataAlways(ctx)
|
||||||
@@ -2810,7 +2808,7 @@ func (o *Object) clearUncommittedBlocks(ctx context.Context) (err error) {
|
|||||||
|
|
||||||
if objectExists {
|
if objectExists {
|
||||||
// Get the committed block list
|
// Get the committed block list
|
||||||
err = pacer.Call(func() (bool, error) {
|
err = o.fs.pacer.Call(func() (bool, error) {
|
||||||
blockList, err = blockBlobSVC.GetBlockList(ctx, blockblob.BlockListTypeAll, nil)
|
blockList, err = blockBlobSVC.GetBlockList(ctx, blockblob.BlockListTypeAll, nil)
|
||||||
return o.fs.shouldRetry(ctx, err)
|
return o.fs.shouldRetry(ctx, err)
|
||||||
})
|
})
|
||||||
@@ -2852,7 +2850,7 @@ func (o *Object) clearUncommittedBlocks(ctx context.Context) (err error) {
|
|||||||
|
|
||||||
// Commit only the committed blocks
|
// Commit only the committed blocks
|
||||||
fs.Debugf(o, "Committing %d blocks to remove uncommitted blocks", len(blockIDs))
|
fs.Debugf(o, "Committing %d blocks to remove uncommitted blocks", len(blockIDs))
|
||||||
err = pacer.Call(func() (bool, error) {
|
err = o.fs.pacer.Call(func() (bool, error) {
|
||||||
_, err := blockBlobSVC.CommitBlockList(ctx, blockIDs, options)
|
_, err := blockBlobSVC.CommitBlockList(ctx, blockIDs, options)
|
||||||
return o.fs.shouldRetry(ctx, err)
|
return o.fs.shouldRetry(ctx, err)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user