Compare commits

...

2 Commits

Author SHA1 Message Date
Rahul Padigela 66bee25813 [wip] potential fix : set the prevPHDKey 2018-08-07 13:52:46 -07:00
Rahul Padigela 90bb0c7fbe [wip] add console logs to debug skip scan 2018-08-07 11:52:18 -07:00
3 changed files with 7 additions and 6 deletions

View File

@ -183,8 +183,10 @@ class Delimiter extends Extension {
this.CommonPrefixes.push(commonPrefix);
this.NextMarker = commonPrefix;
++this.keys;
console.log('key accepted');
return FILTER_ACCEPT;
}
console.log('key skipped')
return FILTER_SKIP;
}

View File

@ -22,6 +22,7 @@ class DelimiterMaster extends Delimiter {
*/
constructor(parameters) {
super(parameters);
// non-PHD master version or a version whose master is a PHD version
this.prvPHDKey = undefined;
}
@ -52,18 +53,15 @@ class DelimiterMaster extends Delimiter {
if (key !== this.prvPHDKey) {
return FILTER_ACCEPT; // trick repd to not increase its streak
}
}
if (Version.isPHD(value)) {
} else if (Version.isPHD(value)) {
// master version is a PHD version: wait for the next version
this.prvPHDKey = key;
return FILTER_ACCEPT; // trick repd to not increase its streak
}
if (Version.isDeleteMarker(value)) {
} else if (Version.isDeleteMarker(value)) {
// version is a delete marker, ignore
return FILTER_ACCEPT; // trick repd to not increase its streak
}
// non-PHD master version or a version whose master is a PHD version
this.prvPHDKey = undefined;
this.prvPHDKey = key;
if (this.delimiter) {
// check if the key has the delimiter
const baseIndex = this.prefix ? this.prefix.length : 0;

View File

@ -988,6 +988,7 @@ class MongoClientInterface {
// skipped
if (++streakLength === MAX_STREAK_LENGTH) {
// stop listing this key range
console.log('skip');
stream.destroy();
// update the new listing parameters here
// eslint-disable-next-line no-param-reassign