# What is the meaning of the content in SSTable?

**URL:** <https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264>\
**Category:** ScyllaDB\
**Tags:** sstable\
**Created:** [February 2, 2024, 9:31am UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264 "2024-02-02T09:31:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bo\_li](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/bo_li/32/438_2.png) [@bo\_li](https://forum.scylladb.com/u/bo_li)\
**Post date:** [February 2, 2024, 9:31am UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264/1 "2024-02-02T09:31:27Z")

</div>

I tested writing and deleting a record normally and found that its SSTable content is as follows.  
write:

```auto
[
  {
    "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:

```auto
[
  {
    "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.

1. Write information, but no deletion\_ info field.

```auto
    "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" }
        ]
      }
    ]

```

1. have liveness\_info and deletion\_ info field, but cells are empty.

```auto
    "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" : []
      }
    ]

```

1. Normal deletion of records.

```auto
	"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!

---

<div class="post-metadata">

**Author:** ![Felix-zhoux](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/felix-zhoux/32/190_2.png) [@Felix-zhoux](https://forum.scylladb.com/u/Felix-zhoux)\
**Post date:** [February 2, 2024, 12:04pm UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264/2 "2024-02-02T12:04:27Z")

</div>

Before 2024-01-31, what will happen if you read this row ?  
I guess there are two possibilities, one is reading 1 (containing cells data), and the other is reading 2 (not containing cells data), because **the tstamp of liveness\_info of 1 and 2 is exactly the same** (“2024-01-28T08:01:22.490042Z”). Looks like this is a **BUG**?

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [February 5, 2024, 7:50am UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264/3 "2024-02-05T07:50:14Z")

</div>

This is C\*'s `sstabledump` and I’m not that familiar with the output-format of this tool, but I think that `liveness_info` is the `row_marker`. The `row_marker` is inserted only by `INSERT` statements, but not `UPDATE` statements. A row not having this is completely fine, this is not a data loss.

For a more clear output, you can try [scylla-sstable](https://opensource.docs.scylladb.com/stable/operating-scylla/admin-tools/scylla-sstable.html), which is our ScyllaDB-native reimplementation of `sstabledump`. This tool is available in 5.1 already, but best to use the latest 5.2 or 5.4 for the best experience.

---

<div class="post-metadata">

**Author:** ![bo\_li](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/bo_li/32/438_2.png) [@bo\_li](https://forum.scylladb.com/u/bo_li)\
**Post date:** [February 7, 2024, 6:27am UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264/4 "2024-02-07T06:27:55Z")

</div>

Hi!  
I want to know what the second situation represents? `liveness_info ` time is later than `deletion_info` time, but `cells` are empty. Does it mean that this record is alive but the attribute is empty? But the first type of record and the second type of record are the same record, which is a bit contradictory. Because the `cells` of the first type of record are not empty.

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [February 7, 2024, 6:46am UTC](https://forum.scylladb.com/t/what-is-the-meaning-of-the-content-in-sstable/1264/5 "2024-02-07T06:46:45Z")

</div>

In (1) you have a row marker and the row has cells. In (2) the row has a row tombstone which covers the cells so they are removed, but it doesn’t cover the row-marker. In (3) there is a new row tombstone which now also covers the row-marker (and so the row marker is also removed).

The row marker (`liveness_info`) does not apply to the row’s content, only the row itself. A row with a live row marker, but no cells, will appear in CQL as an empty row, with just the clustering and static columns having any value.
