Skip to content

Commit

Permalink
Timeout setup in data moved s3 client
Browse files Browse the repository at this point in the history
The S3 client didn’t have any configured timeout
which made the request hang forever when a cloudserver worker crashesd
thus blocking the data-mover workers.
Linked issue : https://scality.atlassian.net/browse/BB-594
  • Loading branch information
benzekrimaha committed Jul 19, 2024
1 parent e19a1e5 commit 31bf72f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/replication/tasks/CopyLocationTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BackbeatTask = require('../../../lib/tasks/BackbeatTask');
const { LifecycleMetrics } = require('../../lifecycle/LifecycleMetrics');
const ReplicationMetric = require('../ReplicationMetric');
const ReplicationMetrics = require('../ReplicationMetrics');
const { attachReqUids } = require('../../../lib/clients/utils');
const { attachReqUids, TIMEOUT_MS } = require('../../../lib/clients/utils');
const { getAccountCredentials } =
require('../../../lib/credentials/AccountCredentials');
const RoleCredentials =
Expand Down Expand Up @@ -77,7 +77,7 @@ class CopyLocationTask extends BackbeatTask {
endpoint: `${transport}://${s3.host}:${s3.port}`,
credentials: s3Credentials,
sslEnabled: transport === 'https',
httpOptions: { agent: this.sourceHTTPAgent, timeout: 0 },
httpOptions: { agent: this.sourceHTTPAgent, timeout: TIMEOUT_MS },
maxRetries: 0,
});
this.backbeatMetadataProxy = new BackbeatMetadataProxy(
Expand Down

0 comments on commit 31bf72f

Please sign in to comment.