voonhous commented on code in PR #19163:
URL: https://github.com/apache/hudi/pull/19163#discussion_r3870794142


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/common/HoodieSparkSqlTestBase.scala:
##########
@@ -119,6 +119,11 @@ class HoodieSparkSqlTestBase extends FunSuite with 
BeforeAndAfterAll {
             catalog.dropTable(table, true, true)
           }
         }
+        // The INMEMORY index keeps a JVM-static record-location map; reset it 
after every test so
+        // stale keys from an earlier test cannot misroute writes in a later 
one. withRecordType
+        // clears it between record-type iterations, but only on success and 
only for tests that use
+        // it, so a throwing or non-withRecordType INMEMORY test would 
otherwise leak state here.
+        HoodieInMemoryHashIndex.clear()

Review Comment:
   Done, `clear()` is now the first statement in the `finally`.
   



-- 
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]

Reply via email to