Comments (5)
Comment #1 originally posted by john.carrino on 2011-08-13T19:18:34.000Z:
Actually I realized there is an iterator snapshot operation. This will work for me in this case. Do you know the performance penalty of using a snapshot?
from leveldb.
Comment #2 originally posted by [email protected] on 2011-08-15T00:19:00.000Z:
Hi John, thanks a lot for your tests.
We'd like to patch these tests into LevelDB code's - do you mind filling out this CLA so we can patch it in?
http://code.google.com/legal/individual-cla-v1.0.html
Let me know when you've completed this.
Thanks for your help,
Gabor
from leveldb.
Comment #3 originally posted by david.yu.ftw on 2011-08-15T05:55:05.000Z:
"I would like to find the first key that is less than a given key. I can only think of two ways to achieve this goal and they both fail.
- seek to key then go back one. This fails because if the key you want is the last key, then you have an invalid iterator and you get a segfault."
I've the same use-case but I solved # 1 by adding a definite last key as a marker. This key is checked on database startup ... and initialized if database is new.
Its possible if your keys are predictable (I used 0xFFFF as the exclusive last key).
from leveldb.
Comment #4 originally posted by [email protected] on 2011-08-22T20:55:38.000Z:
This should be fixed in R48 - please verify!
from leveldb.
I've run into the same issue re Prev on an "end" iterator (when Seek runs past the last key).
I tried John's tests on the latest code in master (7035af5) and they both fail there.
On ab323f7, which was supposed to fix this issue, IterSnapshotViewSeekToEnd passes, but not IterPastEndThenPrev.
I currently have to use the dummy key approach suggested by David to get around it.
from leveldb.
Related Issues (20)
- Why leveldb made flush() in table_builder.h public?
- 45ebb5e012f76928db62e78f71ee82368b2fd230
- Why do we have to pass a pointer to a `std::string` to `Get()` ? HOT 2
- Nr
- A small question of Corruption_Test
- LevelDB get stuck in leveldb::DBImpl::MakeRoomForWrite() for 1.13
- Shared from Bing: https://mathsolver.microsoft.com/en/quiz/fmr8yx5s?ref=s
- zlib compression support
- readrandom performance
- Question - Iterator with an UNIQUE result
- Memory consumption problem
- Consider Profile-Guided Optimiazation tuning
- In the member function ParseNextKey() of the Block::Ite class in the leveldb/table/block.cc file, the last member variable restart_index_ updated. HOT 1
- Corruption: corrupted compressed block contents HOT 1
- Write Amplification factor for small key-values with frequent writes to levelDB
- leveldb created from large batch writes temporarily grows too much from 'compacting': lesson - compact before moving to system with low storage HOT 2
- check_library_exists cannot find snappy package correctly HOT 1
- Question: Each KV pair has 2 copies in arena?
- Incompatibility when upgrading 1.20 -> 1.22
- Lock file Not found error
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 leveldb.