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

Create fate table in upgrade code #4692

Closed
keith-turner opened this issue Jun 22, 2024 · 5 comments · Fixed by #4760
Closed

Create fate table in upgrade code #4692

keith-turner opened this issue Jun 22, 2024 · 5 comments · Fixed by #4760
Assignees
Milestone

Comments

@keith-turner
Copy link
Contributor

The fate table needs to be created in the upgrade process. It should be created exactly the same way as the init code creates the table. Ideally upgrade and init would share code.

@keith-turner keith-turner converted this from a draft issue Jun 22, 2024
@keith-turner keith-turner changed the title Ensure fate table is created in upgrade Create fate table in upgrade code Jun 22, 2024
@keith-turner
Copy link
Contributor Author

There seems to be some existing code that creates the fate table in upgrade. However it does not seem to do everything the init code does like set some initial table properties.

@keith-turner
Copy link
Contributor Author

keith-turner commented Jun 22, 2024

The following is some code that I found that init runs, but could not find upgrade running. Possible I missed something.

setTableProperties(context, AccumuloTable.FATE.tableId(), initConfig.getFateTableConf());

@cshannon
Copy link
Contributor

Besides setting properties there seems to be a couple more things that would need to be done during upgrade that FileSystemInitializer is handling for a new system. All of it is driven by the FileSystemInitializer initialize() method:

  1. We need to create the new directories for the new table which is done here and here
  2. We need to add entries to the metadata table for the new Fate tablet which is done here

@keith-turner - I am not sure if I am missing anything else or if that is it. I am thinking we might need to do some refactoring with the initializer so that the upgrade code can also use it. Because the new Scan ref table is used in both 3.1 and elasticity maybe that should be done first in #4652 and include some refactoring, and then we can update elasticity upgrade to use it for Fate as well. It might be tricky to do both tables together in the same commit with Fate only applying to elasticity.

@ddanielr
Copy link
Contributor

ddanielr commented Jul 1, 2024

@cshannon The last piece you need is the table node creation in ZK.
That is handled within the ZooKeeperInitializer here.

If this isn't called then the setTableProperties method will fail because the top-level table entry in ZK doesn't exist yet.

I agree that the init code needs to be refactored so both upgrade and init can use it.

@keith-turner
Copy link
Contributor Author

I plan to get the test in #4717 and #4718 working with 2.1. Then will have a way to test upgrade from 2.1->3.1 and 2.1->4.0. Once that is in place can make the 2.1 code create some scan refs prior to upgrade and verify in 3.1 and 4.0 that they are deleted after upgrade.

@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
@ddanielr ddanielr linked a pull request Jul 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants