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

Unable to open markfile with version 0 #638

Closed
pgrange opened this issue Feb 14, 2019 · 4 comments
Closed

Unable to open markfile with version 0 #638

pgrange opened this issue Feb 14, 2019 · 4 comments
Labels

Comments

@pgrange
Copy link

pgrange commented Feb 14, 2019

After upgrading aeron, I suddenly can't open mark-files generated by the cluster.

aeron-cluster-mark-codecs version has been downgraded from 1 to 0 in this commit: 3cdafbd

We can see this version 0 here: https://github.com/real-logic/aeron/blob/master/aeron-cluster/src/main/resources/aeron-cluster-mark-codecs.xml#L5

Now, when I try to open a mark-file generated by aeron using ClusterMarkFile I get this exception:

java.lang.IllegalStateException: Mark file is created but not initialised
	at org.agrona.MarkFile.mapExistingMarkFile(MarkFile.java:420)
	at org.agrona.MarkFile.<init>(MarkFile.java:180)
	at io.aeron.cluster.service.ClusterMarkFile.<init>(ClusterMarkFile.java:142)
	at Status.openMarkFile(Status.java:224)
	at Status.healthyness(Status.java:158)
	at Status.isHealthy(Status.java:131)
	at Status.main(Status.java:117)

This seems to be directly related to agrona considering that 0, as a version, is its null value and considers it an error:
https://github.com/real-logic/agrona/blob/master/agrona/src/main/java/org/agrona/MarkFile.java#L533

@BodySplash
Copy link

BodySplash commented Feb 14, 2019

That means also, that most commands in io.aeron.cluster.ClusterTool are not working.

I guess an easy solution would be to change codecs version from 0 to 1, but I'm not sure what would be the impact.

@ZachBray
Copy link
Contributor

ZachBray commented Feb 14, 2019

FYI this seems to surface when using the ClusterTool but not when running a cluster node. Whilst they both construct ClusterMarkFiles they do so using different constructors. Only the ClusterTool ends up executing MarkFile.mapExistingMarkFile(...) which contains this check that the version is not 0.

@mjpt777 mjpt777 added the bug label Feb 14, 2019
@mjpt777
Copy link
Contributor

mjpt777 commented Feb 14, 2019

The use of SBE schema version and mark file version have been conflated by mistake. We'll look at how to address this and give priority in the solution to those with a support contract.

@mjpt777
Copy link
Contributor

mjpt777 commented Feb 15, 2019

Fixed with this commit. d3fc6b7

@mjpt777 mjpt777 closed this as completed Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants