Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Colocation] Drop flow #3035

Closed
ndeodhar opened this issue Nov 27, 2019 · 2 comments
Closed

[Colocation] Drop flow #3035

ndeodhar opened this issue Nov 27, 2019 · 2 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL)
Milestone

Comments

@ndeodhar
Copy link
Contributor

In colocated tablet, drop table should delete the rows for the table being deleted. (This can be done by adding a delete marker for the cotableid).
Drop database should delete the table for the DB.

@ndeodhar ndeodhar added the area/ysql Yugabyte SQL (YSQL) label Nov 27, 2019
@ndeodhar ndeodhar added this to the v2.1 milestone Nov 27, 2019
@ndeodhar ndeodhar added this to To do in YSQL via automation Nov 27, 2019
@jaki jaki moved this from To do to In progress in YSQL Dec 6, 2019
jaki pushed a commit that referenced this issue Jan 15, 2020
Summary:
Currently, table colocation is supported for the create flow: `CREATE
DATABASE`, `CREATE TABLE`, and `CREATE INDEX` including opt-out.  Work
on supporting the drop flow.

* Add support for `DROP DATABASE` on colocated databases.
* Add support for `DROP TABLE` on colocated tables with the caveat that
  data for the table does not get deleted.  In the meantime, to work
  around this issue, execute `DELETE FROM <table>` before `DROP TABLE
  <table>`.
* Omit support for `TRUNCATE`.  For now, executing `TRUNCATE` on a
  colocated table will delete **all data** (including those of other
  tables) from its parent tablet.
* Update tests.

Test Plan:
* `./yb_build.sh --cxx-test pg_libpq-test --gtest_filter
  PgLibPqTest.TableColocation`
* `./yb_build.sh --java-test org.yb.pgsql.TestPgRegressBetaFeatures`

Reviewers: neha

Reviewed By: neha

Subscribers: yql, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D7737
@jaki
Copy link
Contributor

jaki commented Jan 15, 2020

Commit 306f53b adds basic support for the drop flow without handling data deletion and without supporting TRUNCATE. Push the rest of the data deletion tasks into separate issues:

  1. [colocation] Prevent TRUNCATE from affecting all tables in tablet #3357
  2. [colocation] Create table-level tombstones for data deletion #3358
  3. [colocation] Make reads aware of table-level tombstone #3359
  4. [colocation] Make compactions aware of table-level tombstone #3360

@jaki jaki closed this as completed Jan 15, 2020
YSQL automation moved this from In progress to Done Jan 15, 2020
@frozenspider
Copy link
Contributor

Commit 306f53b adds basic support for the drop flow without handling data deletion and without supporting TRUNCATE.

Possibly related: #10912

@frozenspider frozenspider added this to To do in Colocation via automation May 18, 2022
@frozenspider frozenspider moved this from To do to Done in Colocation May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL)
Projects
YSQL
  
Done
Development

No branches or pull requests

3 participants