0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cell tombstones

0
Posted at

CassandraのCell tombstonesについて

Cell tombstoneは、特定のセルの削除で生成するtombstone

before

cqlsh:sitest01>  select * from test_tomb where pkey1 = 'rei' and pkey2 =1;

 pkey1 | pkey2 | skey1 | v1
-------+-------+-------+---------------------
   rei |     1 |     1 |              Bombay
   rei |     1 |     2 | Brazilian Shorthair

(2 rows)

  {
    "partition" : {
      "key" : [ "rei", "1" ],
      "position" : 290
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 336,
        "clustering" : [ 1 ],
        "liveness_info" : { "tstamp" : "2019-12-15T08:45:48.827508Z" },
        "cells" : [
          { "name" : "v1", "value" : "Bombay" }
        ]
      },
      {
        "type" : "row",
        "position" : 336,
        "clustering" : [ 2 ],
        "liveness_info" : { "tstamp" : "2019-12-15T08:45:48.833270Z" },
        "cells" : [
          { "name" : "v1", "value" : "Brazilian Shorthair" }
        ]
      }
    ]
  }

delete

cqlsh:sitest01> delete v1 from test_tomb where pkey1 = 'rei' and pkey2 =1 and skey1 = 1;

after

cqlsh:sitest01>  select * from test_tomb where pkey1 = 'rei' and pkey2 =1;

 pkey1 | pkey2 | skey1 | v1
-------+-------+-------+---------------------
   rei |     1 |     1 |                null
   rei |     1 |     2 | Brazilian Shorthair

(2 rows)

  {
    "partition" : {
      "key" : [ "rei", "1" ],
      "position" : 290
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 335,
        "clustering" : [ 1 ],
        "liveness_info" : { "tstamp" : "2019-12-15T08:45:48.827508Z" },
        "cells" : [
          { "name" : "v1", "deletion_info" : { "local_delete_time" : "2019-12-15T09:04:53Z" },
            "tstamp" : "2019-12-15T09:04:53.756348Z"
          }
        ]
      },
      {
        "type" : "row",
        "position" : 335,
        "clustering" : [ 2 ],
        "liveness_info" : { "tstamp" : "2019-12-15T08:45:48.833270Z" },
        "cells" : [
          { "name" : "v1", "value" : "Brazilian Shorthair" }
        ]
      }
    ]
  }


Estimated tombstone drop times:
1576400700:         1

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?