Skip to content

Comments

Fix Consul key path used when determining leader.#4937

Merged
davsclaus merged 2 commits intoapache:masterfrom
colin-mullikin:consulLeader
Jan 28, 2021
Merged

Fix Consul key path used when determining leader.#4937
davsclaus merged 2 commits intoapache:masterfrom
colin-mullikin:consulLeader

Conversation

@colin-mullikin
Copy link
Contributor

The session lock is on the full key path, not on the root path. As far as I can tell, the result of this method isn't actually used anywhere, but this fix at least makes it correct.

I discovered this issue due to my Consul ACL policy. My application has access to the full key path, but does not have access to the configured root path, so I was getting an error at startup.

@lburgazzoli
Copy link
Contributor

@colin-mullikin thx for spotting this, is there any chance you also provide a test ?

The session lock is on the full key path, not on the root path. As far as I can tell, the result of this method isn't actually used anywhere, but this fix at least makes it correct.
@colin-mullikin
Copy link
Contributor Author

Last push was just to add the Apache header to my test file.

@davsclaus davsclaus merged commit 8c572b7 into apache:master Jan 28, 2021
@colin-mullikin colin-mullikin deleted the consulLeader branch January 28, 2021 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants