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

jyothsnakonisa pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-sidecar.git

commit d67a5e3b486f621e6e02b765e3dd568c6163e22f
Author: jkonisa <[email protected]>
AuthorDate: Tue May 19 14:33:01 2026 -0700

    CASSSIDECAR-459: Fix ON_CDC_CACHE_WARMED_UP not fired when schema publisher 
fails
    
    Patch by Jyothsna Konisa; Reviewed by Josh McKenzie for CASSSIDECAR-459
---
 CHANGES.txt                                        |  1 +
 .../cassandra/sidecar/cdc/CachingSchemaStore.java  | 22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index d1a25028..cb375f70 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 0.4.0
 -----
+ * Fix ON_CDC_CACHE_WARMED_UP not fired when schema publisher fails 
(CASSSIDECAR-459)
  * Add SidecarReplicationFactorSupplier for live replication factor lookups 
(CASSSIDECAR-458)
  * Fix CDC message loss during Sidecar restarts (CASSSIDECAR-457)
  * Fix CDC resource leaks: thread leaks, Kafka resource cleanup, singleton 
SidecarCdcClient (CASSSIDECAR-456)
diff --git 
a/server/src/main/java/org/apache/cassandra/sidecar/cdc/CachingSchemaStore.java 
b/server/src/main/java/org/apache/cassandra/sidecar/cdc/CachingSchemaStore.java
index e57aa4e9..e91bd6b6 100644
--- 
a/server/src/main/java/org/apache/cassandra/sidecar/cdc/CachingSchemaStore.java
+++ 
b/server/src/main/java/org/apache/cassandra/sidecar/cdc/CachingSchemaStore.java
@@ -150,8 +150,15 @@ public class CachingSchemaStore implements SchemaStore
                         return v;
                     });
                 }
-                loadPublisher();
-                publishSchemas();
+                try
+                {
+                    loadPublisher();
+                    publishSchemas();
+                }
+                catch (Exception e)
+                {
+                    LOGGER.error("Failed to publish schemas to Kafka during 
initialization, CDC will still start", e);
+                }
             });
         });
     }
@@ -211,8 +218,15 @@ public class CachingSchemaStore implements SchemaStore
                 return v;
             });
         }
-        loadPublisher();
-        publishSchemas();
+        try
+        {
+            loadPublisher();
+            publishSchemas();
+        }
+        catch (Exception e)
+        {
+            LOGGER.error("Failed to publish schemas to Kafka, CDC will still 
start", e);
+        }
         // Remove any old schema entries for deleted tables, this operation 
can be done in the end as this is
         // only for removing stale entries and no one is going to use these 
entries once the table is removed.
         // This doesn't have to be an atomic operation.


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

Reply via email to