I tested writing and deleting a record normally and found that its SSTable content is as follows.
write:
[
{
"partition" : {
"key" : [ "user6284781860667377211" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 37,
"clustering" : [ "hashKeyPrefix4747011" ],
"liveness_info" : { "tstamp" : "2024-02-02T07:36:44.910271Z" },
"deletion_info" : { "marked_deleted" : "2024-02-02T07:36:44.910270Z", "local_delete_time" : "2024-02-02T07:36:44Z" },
"cells" : [
{ "name" : "\":attrs\"", "path" : [ "field0" ], "value" : "0x01796c6c754e4a4853704e675577744645714751496b6a6f73464d5550575a755a5543746a7a5a4b61784746777268684159495a6956704d774c76426b514f665472694d634f6d52686744654d6171437165704d73444f726769724b6a4f4d67494a576472" },
{ "name" : "\":attrs\"", "path" : [ "field1" ], "value" : "0x0165537a666f44726757736f524b6350424e4e6e4b416b7371504e4f676849706d4b574b716a534a616e4c464c7857466c674c4555666c624d496752597078736755637346744556764a624c5371515767615a496f7964656e4b76616674627775744c4a7a" },
{ "name" : "\":attrs\"", "path" : [ "field2" ], "value" : "0x016b445769477067685a674571537a467843786d437950635a794a4c6565464457764e4476494272424d6873715066555457424d434a7450416e7443726178624450534f5063456a7a6c4f72614c4262506676695a5061756d4f79616b494e6a6c4771616c" },
{ "name" : "\":attrs\"", "path" : [ "field3" ], "value" : "0x01476c42647965435979596b4d6c75736b4e74756b6967534e765267756e6b45674d675474696352785559626e7368475276436e4379656645556c6851646877556f566873564755414c6f6b6a43674b4e71594369536f614a6c795343716b746e626e7246" },
{ "name" : "\":attrs\"", "path" : [ "field4" ], "value" : "0x01514f63674167714777686a5666667361414e47424363424b434945657770486b4375526b6e715164566b786750447a567152665968516e5368766171444e554f5967547079694b6d504d66414746497a6d41626a6548676f75646e787279755348505078" }
]
}
]
}
]
delete:
[
{
"partition" : {
"key" : [ "hashKeyPrefix4747011" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 34,
"clustering" : [ "user6284781860667377211" ],
"deletion_info" : { "marked_deleted" : "2024-02-02T07:47:31.542677Z", "local_delete_time" : "2024-02-02T07:47:31Z" },
"cells" : [ ]
}
]
}
]
When I do a lot of writing and deleting, I find that some properties of the records do not exist when reading data. I have found the SSTable content information for this record. There are three pieces of information in total.
- Write information, but no deletion_ info field.
"rows" : [
{
"type" : "row",
"position" : 406041271,
"clustering" : [ "hashKeyPrefix47470122111" ],
"liveness_info" : { "tstamp" : "2024-01-28T08:01:22.490042Z" },
"cells" : [
{ "name" : "\":attrs\"", "path" : [ "field0" ], "value" : "0x01796c6c754e4a4853704e675577744645714751496b6a6f73464d5550575a755a5543746a7a5a4b61784746777268684159495a6956704d774c76426b514f665472694d634f6d52686744654d6171437165704d73444f726769724b6a4f4d67494a576472" },
{ "name" : "\":attrs\"", "path" : [ "field1" ], "value" : "0x0165537a666f44726757736f524b6350424e4e6e4b416b7371504e4f676849706d4b574b716a534a616e4c464c7857466c674c4555666c624d496752597078736755637346744556764a624c5371515767615a496f7964656e4b76616674627775744c4a7a" },
{ "name" : "\":attrs\"", "path" : [ "field2" ], "value" : "0x016b445769477067685a674571537a467843786d437950635a794a4c6565464457764e4476494272424d6873715066555457424d434a7450416e7443726178624450534f5063456a7a6c4f72614c4262506676695a5061756d4f79616b494e6a6c4771616c" },
{ "name" : "\":attrs\"", "path" : [ "field3" ], "value" : "0x01476c42647965435979596b4d6c75736b4e74756b6967534e765267756e6b45674d675474696352785559626e7368475276436e4379656645556c6851646877556f566873564755414c6f6b6a43674b4e71594369536f614a6c795343716b746e626e7246" },
{ "name" : "\":attrs\"", "path" : [ "field4" ], "value" : "0x01514f63674167714777686a5666667361414e47424363424b434945657770486b4375526b6e715164566b786750447a567152665968516e5368766171444e554f5967547079694b6d504d66414746497a6d41626a6548676f75646e787279755348505078" }
]
}
]
- have liveness_info and deletion_ info field, but cells are empty.
"rows" : [
{
"type" : "row",
"position" : 49131273,
"clustering" : [ "hashKeyPrefix47470122111" ],
"liveness_info" : { "tstamp" : "2024-01-28T08:01:22.490042Z" },
"deletion_info" : { "marked_deleted" : "2024-01-28T8:01:22.490041Z", "local delete time" : "2024-01-28T08:01:22z" },
"cells" : [ ]
}
]
- Normal deletion of records.
"rows" : [
{
"type" : "row",
"position" : 19100032,
"clustering" : [ "hashKeyPrefix47470122111" ],
"deletion_info" : { "marked_deleted" : "2024-01-31T11:20:22.852785Z", "local delete time" : "2024-01-31T11:20:22Z" },
"cells" : [ ]
}
]
So, what I want to ask is, should a normal write record include both liveness_info and deletion_info, and cells is not empty. Is there a problem with the first and second types of records? Seeing time happening simultaneously. Is the second type caused by data loss?
Thanks!