cloud-fan commented on a change in pull request #27765: [SPARK-31014][CORE] InMemoryStore: remove key from parentToChildrenMap when removing key from CountingRemoveIfForEach URL: https://github.com/apache/spark/pull/27765#discussion_r387467686
########## File path: common/kvstore/src/main/java/org/apache/spark/util/kvstore/InMemoryStore.java ########## @@ -278,7 +276,22 @@ public void put(T value) throws Exception { public boolean delete(Object key) { boolean entryExists = data.remove(asKey(key)) != null; - if (entryExists && hasNaturalParentIndex) { + if (entryExists) { + deleteParentIndex(key); Review comment: we should only do it when `hasNaturalParentIndex=true`? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org