Skip to content

Commit c156b94

Browse files
fixup on verify replication error handling
Issue: S3UTILS-202
1 parent 5c0f048 commit c156b94

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

VerifyReplication/verifyReplication.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ function verifyObjects(objectList, cb) {
4343
return destinationStorage.getObjMd(params, (err, dstMd) => {
4444
++statusObj.dstProcessedCount;
4545
if (err) {
46-
++statusObj.dstFailedMdRetrievalsCount;
47-
logger.error('error getting metadata', {
48-
error: err,
49-
bucket: statusObj.dstBucket,
50-
key: dstKey,
51-
srcLastModified,
52-
});
5346
if (err instanceof NotFound) {
5447
++statusObj.missingInDstCount;
48+
} else {
49+
++statusObj.dstFailedMdRetrievalsCount;
50+
logger.error('error getting metadata', {
51+
error: err,
52+
bucket: statusObj.dstBucket,
53+
key: dstKey,
54+
srcLastModified,
55+
});
5556
}
5657
// log the error and continue processing objects
5758
return done();

listFailedObjects.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const http = require('http');
66
const { Logger } = require('werelogs');
77

88
const log = new Logger('s3utils:listFailedObjects');
9-
/* eslint-disable no-console */
109

1110
// configurable params
1211
const BUCKETS = process.argv[2] ? process.argv[2].split(',') : null;
@@ -129,4 +128,3 @@ async.mapSeries(
129128
}
130129
},
131130
);
132-
/* eslint-enable no-console */

0 commit comments

Comments
 (0)