Comments (7)
pmemstream_entry_iterator_get
could actually just return pmemstream_entry by value. Its precondition is pmemstream_entry_iterator_is_valid() == 0
anyway, right?
from pmemstream.
It's right as long as you cannot remove region when region or entry iterator points to it. IMO, we may do it this way.
from pmemstream.
Yes, the idea is that iterator will block removal. If it would not, we would not have any way of detecting this anyway I think.
from pmemstream.
What's the correct behavior for:
struct pmemstream_region pmemstream_region_iterator_get(struct pmemstream_region_iterator *iterator, struct pmemstream_region *region);
when:
void invalid_region_test(char *path)
{
pmemstream_test_env env = pmemstream_test_make_default(path);
const uint64_t invalid_offset = ALIGN_DOWN(UINT64_MAX, sizeof(span_bytes));
struct pmemstream_region_iterator *riter = NULL;
struct pmemstream_region invalid_region = {.offset = invalid_offset};
int ret = pmemstream_region_iterator_new(&riter, env.stream);
UT_ASSERTeq(ret, 0);
UT_ASSERTne(riter, NULL);
pmemstream_region_iterator_seek_first(riter);
invalid_region = pmemstream_region_iterator_get(riter);
UT_ASSERTeq(invalid_region.offset, invalid_offset); // HERE
pmemstream_region_iterator_delete(&riter);
pmemstream_test_teardown(env);
}
from pmemstream.
the above question is resolved now - an invalid region is just returned from get
and such region can always be checked by pmemstream_entry_iterator_is_valid
function.
// region part is done in #186
from pmemstream.
@lukaszstolarczuk why this is closed? entry iterator API is not done yet, right?
from pmemstream.
yeah, for some reason GH closed this (the commit has a reference to this issue).
from pmemstream.
Related Issues (20)
- 0.2.0 release feature list HOT 2
- Expose `pmemstream_entry_timestamp(struct pmemstream_entry)`
- Use shrinkable number of threads in more tests
- Future feature ideas
- [RC tests] timestamp order with multiple threads and multiple regions tests HOT 4
- Recovery during recovery test HOT 2
- async_append and reserve/async_publish with custom data mover
- concurrent_async_wait_0_pmemcheck timeouts HOT 1
- some pmreorder tests are run with ASAN
- Simplify pmemstream API HOT 3
- Enable thread sanitizer for tests
- Failing tests with TSAN feature HOT 3
- Update README file HOT 3
- Optimization ideas
- Extra test for region allocate/free
- Crash inconsistency in region allocation
- codecov clang builds are missing
- Extend pmemstream customizability
- Hanging on in a multithreaded future poll after async append
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmemstream.