Github user PepperJo commented on a diff in the pull request:
https://github.com/apache/incubator-crail/pull/6#discussion_r170579020
--- Diff: namenode/src/main/java/org/apache/crail/namenode/TableBlocks.java
---
@@ -34,6 +35,10 @@ public AbstractNode putChild(AbstractNode child) throws
Exception {
throw new Exception("Attempt to create key/value pair
in container other than a table");
}
- return children.put(child.getComponent(), child);
+ AbstractNode oldNode = children.put(child.getComponent(),
child);
+ if (child.isEnumerable()) {
+
child.setDirOffset(dirOffsetCounter.getAndAdd(CrailConstants.DIRECTORY_RECORD));
--- End diff --
I disagree, because if you are going to change the logic you have to
remember changing it at two places. But I don't feel strong about it. I'm going
to approve this.
---