Github user chtyim commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/23#discussion_r91567173
--- Diff:
tephra-core/src/main/java/org/apache/tephra/TransactionManager.java ---
@@ -1011,10 +1038,9 @@ private boolean doInvalidate(long writePointer) {
} else {
// invalidate any checkpoint write pointers
LongArrayList childWritePointers =
previous.getCheckpointWritePointers();
- if (childWritePointers != null) {
- for (int i = 0; i < childWritePointers.size(); i++) {
- invalid.add(childWritePointers.get(i));
- }
+ for (long childWritePointer : childWritePointers) {
+ invalid.add(childWritePointer);
+ inProgress.remove(childWritePointer);
--- End diff --
Missed this one in last review, we can use the
`keySet().removeAll(childWritePointers)` as well (and check if
`!childWritePointers.isEmpty()` first). The same for invalid, it can be
`invalid.addAll(childWritePointers)`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---