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

Management tooling - Time machine #95

Open
novoj opened this issue Jan 8, 2024 · 6 comments
Open

Management tooling - Time machine #95

novoj opened this issue Jan 8, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@novoj
Copy link
Contributor

novoj commented Jan 8, 2024

Subissue of #117

New version of evitaDB will be able to reason about different versions of the catalog, which are directly related to certain transactions (some of them could be grouped together - but still the granularity will be quite fine). evitaLab should introduce a new "menu item" called "Time Machine". It will allow to browse through all available versions of the catalog stored on the file system - for each record there will be information about

  • catalog version
  • offset date time of version persistence

For each of these versions, the catalog will be able to provide a list of changes made in a particular transaction (transaction, if several are collapsed within it). But this will be a more expensive operation because the WAL would have to be accessed, read, and aggregated. Also, the information will be missing if the WAL has rotated in the meantime and the information is no longer accessible.

So the UI should provide means to focus on a certain time period and list a few (10-20) versions of the catalog from that time period. For each of this period, it should try to access the WAL and create a digest of the changes made in that version.

Time Machine should be able to restore the snapshot of the catalog in one of these particular catalog versions into a new catalog and load it into a store so that the data becomes available for querying.

@lukashornych
Copy link
Owner

So if I understand it correctly, the time machine screen will only list the changes and versions of catalogs but won't allow for reading actual data of particular version of a catalog in grid and schema viewers. But there will be functionally (a button?) which will be able to create a new catalog with custom name with restored data from a specific version of catalog. Then this catalog will be separate item in the main menu and will allow for data browsing?

@novoj
Copy link
Contributor Author

novoj commented Jan 8, 2024

Yep, that's right.

We wouldn't be able to easily access the data because it would require loading a significant amount of data into memory, and it wouldn't be feasible for multiple versions. But if the developer decides he wants to try to restore a particular version (and look at the data/schema, etc.), he restores it to a new catalog and either deletes that catalog and restores another one, or proceeds with the restored version. Still, I think it's a pretty impressive feature to have.

... and of course he could reason about the contents from the digest of the WAL.

@lukashornych lukashornych self-assigned this Jan 10, 2024
@lukashornych lukashornych mentioned this issue Jun 18, 2024
24 tasks
@lukashornych lukashornych changed the title Time machine Management tooling - Time machine Jun 18, 2024
@lukashornych lukashornych added the enhancement New feature or request label Jun 18, 2024
@lukashornych
Copy link
Owner

lukashornych commented Jun 18, 2024

Proposal of catalog history view (mutation listing with filter)

Image

Local mutation type will group mutations to: attribute, price, references, etc mutations, not specific mutations

@novoj
Copy link
Contributor Author

novoj commented Jun 18, 2024

The entities should be indented within the transaction to make the listing easier to follow. What about paging? Or maybe infinite load would be better here?!

@lukashornych
Copy link
Owner

lukashornych commented Jun 18, 2024

That was first version, but than I looked into the codebase where the tx mutations separate. Will need to merge it in UI then.

Regarding paging, this will be tricky due to the grouping. From performance standpoint, I think traditional paging will be better but we need to figure out how to page by entire transactions.

@lukashornych
Copy link
Owner

lukashornych commented Jun 18, 2024

Proposal of record history in entity viewer:

Frame 8

It's content will change based on targeted cell.

Entity history (not sure what to display here):

Image

Nested records history (attributes, prices, etc):

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants