-
Notifications
You must be signed in to change notification settings - Fork 478
ACCUMULO-4324 update data version #120
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| import java.util.Map; | ||
| import java.util.Map.Entry; | ||
| import java.util.UUID; | ||
| import java.util.concurrent.TimeUnit; | ||
|
|
||
| import org.apache.accumulo.core.client.Instance; | ||
| import org.apache.accumulo.core.util.Pair; | ||
|
|
@@ -34,9 +35,12 @@ | |
| import org.apache.accumulo.server.zookeeper.ZooReaderWriter; | ||
| import org.apache.hadoop.fs.Path; | ||
| import org.apache.zookeeper.KeeperException; | ||
| import org.apache.zookeeper.KeeperException.NoNodeException; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| import com.google.common.util.concurrent.Uninterruptibles; | ||
|
|
||
| /* | ||
| * This class governs the space in Zookeeper that advertises the status of Write-Ahead Logs | ||
| * in use by tablet servers and the replication machinery. | ||
|
|
@@ -98,10 +102,16 @@ private String root() { | |
| // Tablet server exists | ||
| public void initWalMarker(TServerInstance tsi) throws WalMarkerException { | ||
| byte[] data = new byte[0]; | ||
| try { | ||
| zoo.putPersistentData(root() + "/" + tsi.toString(), data, NodeExistsPolicy.FAIL); | ||
| } catch (KeeperException | InterruptedException e) { | ||
| throw new WalMarkerException(e); | ||
| while (true) { | ||
| try { | ||
| zoo.putPersistentData(root() + "/" + tsi.toString(), data, NodeExistsPolicy.FAIL); | ||
| break; | ||
| } catch (NoNodeException e) { | ||
| log.info("WAL parent node does not exist (upgrade may be in progress) : " + e.getMessage()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ShawnWalker made a very nice suggestion in irc. Create the WALs node instead of waiting. This breaks this invisible dependency on code in the master. |
||
| Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); | ||
| } catch (KeeperException | InterruptedException e) { | ||
| throw new WalMarkerException(e); | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added 1.7 to the set of release we can upgrade from. Probably need to remove some (like everyone that is not tested). I think we should test the upgrade from 1.6 to 1.8 and remove all other releases. Thoughts? I can take a wack at testing 1.6 to 1.8 upgrade testing, unless someone else wants to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.6 and 1.7 to 1.8 sound like they should both work to me.
My gut reaction is to not worry about 1.5, but is there any fundamental problem in supporting that (is it just a testing burden)? If we don't support a direct upgrade from 1.5, what's the fail-safe? Could users just bulk-import the old files into a new instance?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah its just a matter of testing it. I am not completely sure, but it seems code may be in place to support that upgrade. I don't know if it works. Personally I would not want to support it w/o testing it.
Could add support for it in 1.8.1 or later if someone really wants that functionality.
That's tricky, if done incorrectly can resurrect old and/or deleted data.
Also before making any definitive decisions about 1.5 and earlier, we should see if the 1.6 to 1.8 upgrade uncovers any interesting issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on all of your points. Want to break out things to test in a JIRA or something? I can try to help.