capistrant commented on code in PR #18844:
URL: https://github.com/apache/druid/pull/18844#discussion_r2684725036


##########
server/src/main/java/org/apache/druid/segment/metadata/SqlCompactionStateStorage.java:
##########
@@ -94,140 +76,93 @@ public PersistedCompactionStateManager(
     this.connector = connector;
   }
 
-  @LifecycleStart
-  public void start()
-  {
-  }
-
-  @LifecycleStop
-  public void stop()
-  {
-  }
-
-  @VisibleForTesting
-  PersistedCompactionStateManager()
-  {
-    this.dbTables = null;
-    this.jsonMapper = null;
-    this.deterministicMapper = null;
-    this.connector = null;
-  }
-
   @Override
-  public void persistCompactionState(
+  public void upsertCompactionState(
       final String dataSource,
-      final Map<String, CompactionState> fingerprintToStateMap,
+      final String fingerprint,
+      final CompactionState compactionState,
       final DateTime updateTime
   )
   {
-    if (fingerprintToStateMap.isEmpty()) {
+    if (compactionState == null || fingerprint == null || 
fingerprint.isEmpty()) {
       return;

Review Comment:
   ya makes sense to have more strict sanitization here around a db write. I 
feel like what I am pushing up is a bit verbose though



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