DomGarguilo commented on a change in pull request #166:
URL: https://github.com/apache/accumulo-testing/pull/166#discussion_r751561613
##########
File path:
src/main/java/org/apache/accumulo/testing/continuous/ContinuousIngest.java
##########
@@ -191,14 +205,36 @@ public static void main(String[] args) throws Exception {
pauseCheck(testProps, r);
}
- // create one big linked list, this makes all of the first inserts
point to something
- for (int index = 0; index < flushInterval - 1; index++) {
- Mutation m = genMutation(firstRows[index], firstColFams[index],
firstColQuals[index], cv,
- ingestInstanceId, count, genRow(prevRows[index + 1]), checksum);
- count++;
- bw.addMutation(m);
+ // random chance that the entries will be deleted
+ boolean delete = r.nextFloat() < deleteProbability;
+
+ // if the previously written entries are scheduled to be deleted
+ if (delete) {
+ log.info("Deleting last portion of written entries");
+ // add delete mutations in the reverse order in which they were
written
+ for (int depth = nodeMap.length - 1; depth >= 0; depth--) {
+ for (int index = nodeMap[0].length - 1; index >= 0; index--) {
+ MutationInfo currentNode = nodeMap[depth][index];
+ Mutation m = new Mutation(genRow(currentNode.row));
+ m.putDelete(genCol(currentNode.cf), genCol(currentNode.cq));
+ count--;
Review comment:
Addressed in 5e0fcf8. I have a few improvements in mind that are
unrelated to adding deletes. I plan to make a separate PR after this one gets
merged and will add a delete counter there. For now I have removed the
decrementing the counter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]