You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ab...@apache.org on 2025/06/03 22:46:59 UTC

(druid) 01/01: Include datasource name in the failure messages.

This is an automated email from the ASF dual-hosted git repository.

abhishekrb pushed a commit to branch log_improvements
in repository https://gitbox.apache.org/repos/asf/druid.git

commit 59cdbfa4803f54d7a94a724a0b8cb55272424cfe
Author: Abhishek Balaji Radhakrishnan <ab...@gmail.com>
AuthorDate: Tue Jun 3 15:40:40 2025 -0700

    Include datasource name in the failure messages.
    
    When a segment publish error occurs, it's hard to tell which supervisor to
    reset if there are multiple supervisors consuming from the same stream. This
    change includes the datasource name to the error messages. Ideally we would also include
    the supervisor ID in the error, but since the supervisor ID is currently the same as
    the datasource name, this should suffice for now.
---
 .../druid/metadata/IndexerSQLMetadataStorageCoordinator.java      | 8 ++++----
 .../druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java b/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java
index 722b3a8155e..2bf69f7876a 100644
--- a/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java
+++ b/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java
@@ -2200,16 +2200,16 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor
       // the previous task finishes publishing.
       return SegmentPublishResult.retryableFailure(
           "The new start metadata state[%s] is ahead of the last committed"
-          + " end state[%s]. Try resetting the supervisor.",
-          startMetadata, oldCommitMetadataFromDb
+          + " end state[%s]. Try resetting the supervisor for datasource[%s].",
+          startMetadata, oldCommitMetadataFromDb, dataSource
       );
     }
 
     if (!startMetadataMatchesExisting) {
       // Not in the desired start state.
       return SegmentPublishResult.fail(
-          "Inconsistency between stored metadata state[%s] and target state[%s]. Try resetting the supervisor.",
-          oldCommitMetadataFromDb, startMetadata
+          "Inconsistency between stored metadata state[%s] and target state[%s]. Try resetting the supervisor for datasource[%s].",
+          oldCommitMetadataFromDb, startMetadata, dataSource
       );
     }
 
diff --git a/server/src/test/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java b/server/src/test/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java
index db5c23b8d30..c7a6f5e3814 100644
--- a/server/src/test/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java
+++ b/server/src/test/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinatorTest.java
@@ -886,7 +886,7 @@ public class IndexerSQLMetadataStorageCoordinatorTest extends IndexerSqlMetadata
     Assert.assertEquals(
         SegmentPublishResult.retryableFailure(
             "The new start metadata state[ObjectMetadata{theObject={foo=bar}}] is ahead of the last committed"
-            + " end state[null]. Try resetting the supervisor."
+            + " end state[null]. Try resetting the supervisor for supervisor[fooDataSource]."
         ),
         result1
     );
@@ -915,7 +915,7 @@ public class IndexerSQLMetadataStorageCoordinatorTest extends IndexerSqlMetadata
     Assert.assertEquals(
         SegmentPublishResult.fail(
             "Inconsistency between stored metadata state[ObjectMetadata{theObject={foo=baz}}]"
-            + " and target state[ObjectMetadata{theObject=null}]. Try resetting the supervisor."
+            + " and target state[ObjectMetadata{theObject=null}]. Try resetting the supervisor for datasource[fooDataSource]."
         ),
         result2
     );


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org