HeartSaVioR commented on code in PR #49479:
URL: https://github.com/apache/spark/pull/49479#discussion_r1917561043


##########
common/kvstore/src/test/java/org/apache/spark/util/kvstore/LevelDBSuite.java:
##########
@@ -422,6 +423,37 @@ public void testResourceCleaner() throws Exception {
     }
   }
 
+  @Test
+  public void testMultipleTypesWriteAll() throws Exception {
+
+    List<CustomType1> type1List = Arrays.asList(
+      createCustomType1(1),
+      createCustomType1(2),
+      createCustomType1(3),
+      createCustomType1(4)
+    );
+
+    List<CustomType2> type2List = Arrays.asList(
+      createCustomType2(10),
+      createCustomType2(11),
+      createCustomType2(12),
+      createCustomType2(13)
+    );
+
+    List fullList = new ArrayList();
+    fullList.addAll(type1List);
+    fullList.addAll(type2List);
+
+    db.writeAll(fullList);
+    for (CustomType1 value : type1List) {

Review Comment:
   I'd like to understand how this test fails. (Sorry I lost the whole context.)
   
   Because if it's just that writing for the same entity happens multiple 
times, it depends on how we constuct the key (since LevelDB/RocksDB put is 
upsert). If the same entity creates the same key, I don't see how this could 
fail. Maybe even further, even if multiple writes come up with different keys, 
if we can read any of them, the result should be the same. Seems like I'm 
unaware of how this works.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to