Skip to content

Commit ea6a81f

Browse files
authored
Merge pull request #32 from shivanand-adky/main
Correcting indexing when target_vbuckets != null
2 parents f8f88aa + e5db268 commit ea6a81f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/utils/docgen/DocumentGenerator.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public Tuple2<String, Object> next() {
351351
Object v = null;
352352
try {
353353
if (this.target_vbuckets != null && this.target_vbuckets.length > 0) {
354-
k = this.generated_create_keys.get(temp-1);
354+
k = this.generated_create_keys.get(temp);
355355
} else {
356356
k = (String) this.keyMethod.invoke(this.keys, temp);
357357
}
@@ -368,7 +368,7 @@ public Tuple2<String, Object> nextRead() {
368368
Object v = null;
369369
try {
370370
if (this.target_vbuckets != null && this.target_vbuckets.length > 0) {
371-
k = this.generated_read_keys.get(temp-1);
371+
k = this.generated_read_keys.get(temp);
372372
} else {
373373
k = (String) this.keyMethod.invoke(this.keys, temp);
374374
}
@@ -385,7 +385,7 @@ public Tuple2<String, Object> nextUpdate() {
385385
Object v = null;
386386
try {
387387
if (this.target_vbuckets != null && this.target_vbuckets.length > 0) {
388-
k = this.generated_update_keys.get(temp-1);
388+
k = this.generated_update_keys.get(temp);
389389
} else {
390390
k = (String) this.keyMethod.invoke(this.keys, temp);
391391
}
@@ -402,7 +402,7 @@ public Tuple2<String, Object> nextExpiry() {
402402
Object v = null;
403403
try {
404404
if (this.target_vbuckets != null && this.target_vbuckets.length > 0) {
405-
k = this.generated_expiry_keys.get(temp-1);
405+
k = this.generated_expiry_keys.get(temp);
406406
} else {
407407
k = (String) this.keyMethod.invoke(this.keys, temp);
408408
}
@@ -504,7 +504,7 @@ public List<String> nextDeleteBatch() {
504504
try {
505505
temp = this.ws.dr.deleteItr.incrementAndGet();
506506
if (this.target_vbuckets != null && this.target_vbuckets.length > 0) {
507-
docs.add(this.generated_delete_keys.get(temp-1));
507+
docs.add(this.generated_delete_keys.get(temp));
508508
} else {
509509
docs.add((String) this.keyMethod.invoke(this.keys, temp));
510510
}

0 commit comments

Comments
 (0)