Page MenuHomePhabricator

Clean up restrictions tables in cassandra
Closed, ResolvedPublic

Description

The restrictions tables were cleared out of RESTBase codebase, so they should be dropped from cassandra. Tables in prod/dev:

"enwiki_T_page__restrictions"
"wikipedia_T_page__restrictions"
"others_T_page__restrictions"
"commons_T_page__restrictions"

Tables in beta cluster:

"others_T_page__restrictions"

Verified with nodetool that the tables are not used.

Related Objects

StatusSubtypeAssignedTask
Resolved• Pchelolo
Resolved• Pchelolo

Event Timeline

• Pchelolo triaged this task as High priority.

Confirmed; There are no reads/writes occurring on these keyspaces.

10-second r/w sampling
eevans@restbase1007:~$ for i in enwiki_T_page__restrictions wikipedia_T_page__restrictions others_T_page__restrictions commons_T_page__restrictions; do diff <(nodetool-a tablestats $i.data | egrep -E -A 4 "^Keyspace") <(sleep 10; nodetool-a tablestats $i.data | egrep -E -A 4 "^Keyspace"); done 
eevans@restbase1007:~$

The following will do it for the production cluster.

Proposed DROPs
drop_enwiki_T_page__restrictions:
  comment: Obsolete.
  statement: |
    DROP KEYSPACE IF EXISTS "enwiki_T_page__restrictions"

drop_wikipedia_T_page__restrictions:
  comment: Obsolete.
  statement: |
    DROP KEYSPACE IF EXISTS "wikipedia_T_page__restrictions"

drop_others_T_page__restrictions:
  comment: Obsolete.
  statement: |
    DROP KEYSPACE IF EXISTS "others_T_page__restrictions"

drop_commons_T_page__restrictions:
  comment: Obsolete.
  statement: |
    DROP KEYSPACE IF EXISTS "commons_T_page__restrictions"

Manually dropped others_T_page__restrictions in deployment-prep.

eevans@deployment-restbase01:~$ c-cqlsh default
Connected to Test Cluster at 10.68.16.128:9042.
[cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cassandra@cqlsh> DROP KEYSPACE "others_T_page__restrictions";
cassandra@cqlsh>

hm... on restbase1007:

c-cqlsh a -e "describe keyspaces;" | grep restr
"commons_T_page__restrictions"

And the dev cluster was forgotten.

hm... on restbase1007:

c-cqlsh a -e "describe keyspaces;" | grep restr
"commons_T_page__restrictions"

And the dev cluster was forgotten.

This is still in progress... :)

The production cluster has finished.

Dev cluster is {{done}}; Resolving