Leverage unset to avoid ingesting tombstones at the target cluster by default#419
Merged
Leverage unset to avoid ingesting tombstones at the target cluster by default#419
Conversation
pravinbhat
requested changes
Feb 20, 2026
39541b0 to
9d12767
Compare
msmygit
commented
Feb 24, 2026
| } | ||
|
|
||
| TypeCodec<Object> fromCodec = (TypeCodec<Object>) codecRegistry.codecFor(toDataType, fromClass); | ||
| TypeCodec<Object> fromCodec = (TypeCodec<Object>) codecRegistry.codecFor(fromDataType, fromClass); |
Member
Author
There was a problem hiding this comment.
Tip
💡 Code reviewer's assist - This has been a miss for long time and we have addressed it here
pravinbhat
approved these changes
Feb 24, 2026
Collaborator
pravinbhat
left a comment
There was a problem hiding this comment.
Looks good, I tested it locally with two rows
insert into test(pk,cset,ceset,clist,celist,cmap,cemap) values (0,{0,1,2},null,[0,1,2],null,{0:0,1:1},null);
insert into test(pk,cset,ceset,clist,celist,cmap,cemap) values (1,{},null,[],null,{},null);
Then ran migration which copied the two rows fine. Then to verify there are no tombstones, I compared the table dumps & below you can see the target table has no tombstones
Origin table dump (has tombstones)
[
{
"partition" : {
"key" : [ "1" ],
"position" : 18
},
"rows" : [
{
"type" : "row",
"position" : 18,
"liveness_info" : { "tstamp" : "2026-02-24T03:50:04.964017Z" },
"cells" : [
{ "name" : "celist", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } },
{ "name" : "cemap", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } },
{ "name" : "ceset", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } },
{ "name" : "clist", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } },
{ "name" : "cmap", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } },
{ "name" : "cset", "deletion_info" : { "marked_deleted" : "2026-02-24T03:50:04.964016Z", "local_delete_time" : "2026-02-24T03:50:04Z" } }
]
}
]
},
{
"partition" : {
"key" : [ "0" ],
"position" : 80
},
"rows" : [
{
"type" : "row",
"position" : 80,
"liveness_info" : { "tstamp" : "2026-02-24T03:49:36.078759Z" },
"cells" : [
{ "name" : "celist", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "cemap", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "ceset", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "clist", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "clist", "path" : [ "d6420050-1133-11f1-abcf-e78dfc7c9cff" ], "value" : 0 },
{ "name" : "clist", "path" : [ "d6420051-1133-11f1-abcf-e78dfc7c9cff" ], "value" : 1 },
{ "name" : "clist", "path" : [ "d6420052-1133-11f1-abcf-e78dfc7c9cff" ], "value" : 2 },
{ "name" : "cmap", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "cmap", "path" : [ "0" ], "value" : 0 },
{ "name" : "cmap", "path" : [ "1" ], "value" : 1 },
{ "name" : "cset", "deletion_info" : { "marked_deleted" : "2026-02-24T03:49:36.078758Z", "local_delete_time" : "2026-02-24T03:49:36Z" } },
{ "name" : "cset", "path" : [ "0" ], "value" : "" },
{ "name" : "cset", "path" : [ "1" ], "value" : "" },
{ "name" : "cset", "path" : [ "2" ], "value" : "" }
]
}
]
}
]
Target table dump (has NO tombstones)
[
{
"partition" : {
"key" : [ "1" ],
"position" : 18
},
"rows" : [
{
"type" : "row",
"position" : 18,
"liveness_info" : { "tstamp" : "2025-11-04T15:00:07Z" },
"cells" : [ ]
}
]
},
{
"partition" : {
"key" : [ "0" ],
"position" : 42
},
"rows" : [
{
"type" : "row",
"position" : 42,
"liveness_info" : { "tstamp" : "2025-11-04T15:00:07Z" },
"cells" : [
{ "name" : "clist", "deletion_info" : { "marked_deleted" : "2025-11-04T15:00:06.999999Z", "local_delete_time" : "2026-02-24T03:54:13Z" } },
{ "name" : "clist", "path" : [ "7bb83f40-1134-11f1-abcf-e78dfc7c9cff" ], "value" : 0 },
{ "name" : "clist", "path" : [ "7bb83f41-1134-11f1-abcf-e78dfc7c9cff" ], "value" : 1 },
{ "name" : "clist", "path" : [ "7bb83f42-1134-11f1-abcf-e78dfc7c9cff" ], "value" : 2 },
{ "name" : "cmap", "deletion_info" : { "marked_deleted" : "2025-11-04T15:00:06.999999Z", "local_delete_time" : "2026-02-24T03:54:13Z" } },
{ "name" : "cmap", "path" : [ "0" ], "value" : 0 },
{ "name" : "cmap", "path" : [ "1" ], "value" : 1 },
{ "name" : "cset", "deletion_info" : { "marked_deleted" : "2025-11-04T15:00:06.999999Z", "local_delete_time" : "2026-02-24T03:54:13Z" } },
{ "name" : "cset", "path" : [ "0" ], "value" : "" },
{ "name" : "cset", "path" : [ "1" ], "value" : "" },
{ "name" : "cset", "path" : [ "2" ], "value" : "" }
]
}
]
}
]
| } | ||
|
|
||
| TypeCodec<Object> fromCodec = (TypeCodec<Object>) codecRegistry.codecFor(toDataType, fromClass); | ||
| TypeCodec<Object> fromCodec = (TypeCodec<Object>) codecRegistry.codecFor(fromDataType, fromClass); |
3 tasks
6509738 to
974cb38
Compare
Jeremya
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does: CDM should leverage
unsetat the target cluster to avoid ingesting tombstones for empty ornullvalues in the origin cluster table's column value.Which issue(s) this PR fixes:
Fixes #418
Checklist:
Test Strategy
How was this tested?
Origin Cluster -
HCD 1.2.4CDM Migrate Job Run
cdmt.propertiesfile structureMigrate Step
Target Cluster -
Astra DB Serverlesscontent post migratealso, validated by the log lines,