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

Fix and change pathinfo parser code for gluster stripe volume #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ekasitk
Copy link

@ekasitk ekasitk commented Jul 7, 2015

In response to the issue #122 and pathinfo bug https://bugzilla.redhat.com/show_bug.cgi?id=1200914.

  • Updated the pathinfo parser code
  • Add and revise TestBlockLocation.java accordingly
  • getBlockSize() now returns Gluster stripe block size if available

@childsb
Copy link
Contributor

childsb commented Jul 7, 2015

I refactored the blocklocation code significantly a few commits ago. I see this code adds most of the change back in.

Is there a bug this is intended to fix? Can you rebase and try the fix on the refactored version?

@ekasitk
Copy link
Author

ekasitk commented Jul 8, 2015

In a stripe-based volume, a block is located on just a particular stripe. The single pass regex in the #122 cannot parse the pathinfo correctly as it always returns all matching <POSIX..> stripes for any block which is not true. I have tried the "2-step rake" committed previously but it fails in many test cases. Also, the code was difficult to understand (at least for me). So, I decide not to fix the "2-step rake" but extend from the refactored (single pass) code. My code is just to replace the simple regex matching by a small BNF parser of the pathinfo grammar.

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.

2 participants