@@ -99,17 +99,24 @@ ss::future<
99
99
checked<chunked_vector<mark_files_committed_update>, file_committer::errc>>
100
100
iceberg_file_committer::commit_topic_files_to_catalog (
101
101
model::topic topic, const topics_state& state) const {
102
+ vlog (datalake_log.debug , " Beginning commit for topic {}" , topic);
102
103
auto tp_it = state.topic_to_state .find (topic);
103
104
if (
104
105
tp_it == state.topic_to_state .end ()
105
106
|| !tp_it->second .has_pending_entries ()) {
107
+ vlog (datalake_log.debug , " Topic {} has no pending entries" , topic);
106
108
co_return chunked_vector<mark_files_committed_update>{};
107
109
}
108
110
auto topic_revision = tp_it->second .revision ;
109
111
110
112
auto table_id = table_id_for_topic (topic);
111
113
auto table_res = co_await load_table (table_id);
112
114
if (table_res.has_error ()) {
115
+ vlog (
116
+ datalake_log.warn ,
117
+ " Error loading table {} for committing from topic {}" ,
118
+ table_id,
119
+ topic);
113
120
co_return table_res.error ();
114
121
}
115
122
auto & table = table_res.value ();
@@ -130,6 +137,13 @@ iceberg_file_committer::commit_topic_files_to_catalog(
130
137
if (
131
138
tp_it == state.topic_to_state .end ()
132
139
|| tp_it->second .revision != topic_revision) {
140
+ vlog (
141
+ datalake_log.debug ,
142
+ " Commit returning early, topic {} state is missing or revision has "
143
+ " changed: current {} vs expected {}" ,
144
+ topic,
145
+ tp_it->second .revision ,
146
+ topic_revision);
133
147
co_return chunked_vector<mark_files_committed_update>{};
134
148
}
135
149
@@ -148,6 +162,16 @@ iceberg_file_committer::commit_topic_files_to_catalog(
148
162
// replicate the fact that it was committed previously, but
149
163
// don't construct a data_file to send to Iceberg as it is
150
164
// already committed.
165
+ vlog (
166
+ datalake_log.debug ,
167
+ " Skipping entry for topic {} revision {} added at "
168
+ " coordinator offset {} because table {} has data including "
169
+ " coordinator offset {}" ,
170
+ topic,
171
+ topic_revision,
172
+ e.added_pending_at ,
173
+ table_id,
174
+ *iceberg_commit_meta_opt);
151
175
continue ;
152
176
}
153
177
new_committed_offset = std::max (
@@ -168,6 +192,11 @@ iceberg_file_committer::commit_topic_files_to_catalog(
168
192
}
169
193
}
170
194
if (pending_commits.empty ()) {
195
+ vlog (
196
+ datalake_log.debug ,
197
+ " No new data to mark committed for topic {} revision {}" ,
198
+ topic,
199
+ topic_revision);
171
200
co_return chunked_vector<mark_files_committed_update>{};
172
201
}
173
202
chunked_vector<mark_files_committed_update> updates;
@@ -187,6 +216,12 @@ iceberg_file_committer::commit_topic_files_to_catalog(
187
216
}
188
217
if (icb_files.empty ()) {
189
218
// All files are deduplicated.
219
+ vlog (
220
+ datalake_log.debug ,
221
+ " All committed files were deduplicated for topic {} revision {}, "
222
+ " returning without updating Iceberg catalog" ,
223
+ topic,
224
+ topic_revision);
190
225
co_return updates;
191
226
}
192
227
vassert (
@@ -195,6 +230,11 @@ iceberg_file_committer::commit_topic_files_to_catalog(
195
230
const auto commit_meta = commit_offset_metadata{
196
231
.offset = *new_committed_offset,
197
232
};
233
+ vlog (
234
+ datalake_log.debug ,
235
+ " Adding {} files to Iceberg table {}" ,
236
+ icb_files.size (),
237
+ table_id);
198
238
iceberg::transaction txn (std::move (table));
199
239
auto icb_append_res = co_await txn.merge_append (
200
240
io_,
0 commit comments