Compare commits
2 Commits
developmen
...
wip/MD-661
Author | SHA1 | Date |
---|---|---|
Rahul Padigela | 66bee25813 | |
Rahul Padigela | 90bb0c7fbe |
|
@ -183,8 +183,10 @@ class Delimiter extends Extension {
|
||||||
this.CommonPrefixes.push(commonPrefix);
|
this.CommonPrefixes.push(commonPrefix);
|
||||||
this.NextMarker = commonPrefix;
|
this.NextMarker = commonPrefix;
|
||||||
++this.keys;
|
++this.keys;
|
||||||
|
console.log('key accepted');
|
||||||
return FILTER_ACCEPT;
|
return FILTER_ACCEPT;
|
||||||
}
|
}
|
||||||
|
console.log('key skipped')
|
||||||
return FILTER_SKIP;
|
return FILTER_SKIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ class DelimiterMaster extends Delimiter {
|
||||||
*/
|
*/
|
||||||
constructor(parameters) {
|
constructor(parameters) {
|
||||||
super(parameters);
|
super(parameters);
|
||||||
|
// non-PHD master version or a version whose master is a PHD version
|
||||||
this.prvPHDKey = undefined;
|
this.prvPHDKey = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,18 +53,15 @@ class DelimiterMaster extends Delimiter {
|
||||||
if (key !== this.prvPHDKey) {
|
if (key !== this.prvPHDKey) {
|
||||||
return FILTER_ACCEPT; // trick repd to not increase its streak
|
return FILTER_ACCEPT; // trick repd to not increase its streak
|
||||||
}
|
}
|
||||||
}
|
} else if (Version.isPHD(value)) {
|
||||||
if (Version.isPHD(value)) {
|
|
||||||
// master version is a PHD version: wait for the next version
|
// master version is a PHD version: wait for the next version
|
||||||
this.prvPHDKey = key;
|
this.prvPHDKey = key;
|
||||||
return FILTER_ACCEPT; // trick repd to not increase its streak
|
return FILTER_ACCEPT; // trick repd to not increase its streak
|
||||||
}
|
} else if (Version.isDeleteMarker(value)) {
|
||||||
if (Version.isDeleteMarker(value)) {
|
|
||||||
// version is a delete marker, ignore
|
// version is a delete marker, ignore
|
||||||
return FILTER_ACCEPT; // trick repd to not increase its streak
|
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 = key;
|
||||||
this.prvPHDKey = undefined;
|
|
||||||
if (this.delimiter) {
|
if (this.delimiter) {
|
||||||
// check if the key has the delimiter
|
// check if the key has the delimiter
|
||||||
const baseIndex = this.prefix ? this.prefix.length : 0;
|
const baseIndex = this.prefix ? this.prefix.length : 0;
|
||||||
|
|
|
@ -988,6 +988,7 @@ class MongoClientInterface {
|
||||||
// skipped
|
// skipped
|
||||||
if (++streakLength === MAX_STREAK_LENGTH) {
|
if (++streakLength === MAX_STREAK_LENGTH) {
|
||||||
// stop listing this key range
|
// stop listing this key range
|
||||||
|
console.log('skip');
|
||||||
stream.destroy();
|
stream.destroy();
|
||||||
// update the new listing parameters here
|
// update the new listing parameters here
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
|
Loading…
Reference in New Issue