Iterator API #65

Merged
merged 3 commits into from Oct 24, 2012

Projects

None yet

5 participants

@yrashk
Contributor
yrashk commented Oct 24, 2012

This change allows applications that need something more controllable than a "blind fold" to iterate over bitcask keydir keys.

@slfritchie
Contributor

I don't see a reason not to do this. Opinions @gburd or @justinsheehy or @jonmeredith?

@gburd
Contributor
gburd commented Oct 24, 2012

@slfritchie agreed, +1 to merge

@yrashk
Contributor
yrashk commented Oct 24, 2012

If necessary, I can also add iterator, iterator_next and iterator_release wrappers in bitcask module that will extract keydir out of #bc_state{}

@yrashk
Contributor
yrashk commented Oct 24, 2012

(since bc_state is effectively opaque)

@slfritchie
Contributor

Yurii, the extractors sound good, er, or even necessary. I guess it becomes the user's responsibility to not do anything dumb with that state. You could (in theory) go meddling with the keydir and break things in countless ways. But if that's what you want to do, that's rope that I'm willing to give. Any disagreement, oh Bashonians?

@yrashk
Contributor
yrashk commented Oct 24, 2012

I am working on wrappers already.

@jonmeredith
Contributor

I'd personally like to see the wrappers. Bitcask should present a single-module interface rather than have people digging in the process dictionary and working out the NIF arguments.

(just saw you say you were working on wrappers as I wrote it).

@yrashk
Contributor
yrashk commented Oct 24, 2012

Added wrappers

@yrashk
Contributor
yrashk commented Oct 24, 2012

Thoughts? Can we merge this? I would love to be able to use this instead of playing with an opaque structure stored in my process' dictionary...

@justinsheehy
Contributor

+1

Merging.

@justinsheehy justinsheehy merged commit 15ab02e into basho:master Oct 24, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment