Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2.2 Behaviors of FATE Operations

Certain behavior of normal FATE operations should be modified to accommodate trash can feature.

2.2.1 Delete Table Operation

When trashing is enabled, the behavior of the delete table FATE operation should be different. After obtaining the table lock, delete table should do the following for a table not in TRASH:

  • Change the table state to TRASH
  • Change the table name to something unique that preserves the original table name such as "trash-<origname><yyyymmddhhmmss><count>"

Whereas, if the delete table operation is called on a table already in the TRASH state, it should proceed with the normal delete operations.

2.2.2 Undelete Operation

Undeleting a table will require a new fate operation. This fate operation should be very similar to rename table, with the additional operation of changing the table state to ONLINE.