Comments (7)
Fixed in commit 322e423
from sonnerie.
Similarly, doing
while :; do sonnerie -d db read % || break; done
on a database with about a 1000 rows and then running
sonnerie -d db compact
will result in the loop stopping with Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
.
from sonnerie.
What operating system are you on?
from sonnerie.
Arch Linux. I also tried this on a custom LFS-like embedded Linux system and got the same results. sonnerie v0.8.5 and ext4 for both.
from sonnerie.
Interesting, this doesn't seem to happen on a Linux Mint 21 machine with ext4. On that machine the compaction loop just says disregarding "db/tx.*", it is zero length
on every iteration.
from sonnerie.
Interesting, this doesn't seem to happen on a Linux Mint 21 machine with ext4. On that machine the compaction loop just says
disregarding "db/tx.*", it is zero length
on every iteration.
Scratch that, it still happens, but a lot less often. Easy to catch it with
for i in $(seq 1 100000); do echo $i; echo "test $i $i" | sonnerie -d db add --format u || break; done
from sonnerie.
It seems like there's a race condition in the time between the completion of read_dir
and the actual opening of the files. If a compaction completes in between those two actions, then some files that were previously found via the read_dir
will have been deleted by the compaction.
If that happens, then I think the correct action is to try the read_dir
again from the beginning. You can't simply ignore the missing files, because your read_dir
necessarily will not have opened the file they'll have been compacted into.
from sonnerie.
Related Issues (20)
- Filter results on timestamp range HOT 2
- Add high-level API (that doesn't require stream formatting) HOT 2
- Allow realtime erase HOT 1
- API for very fast parallel extraction
- compact --gegnum does not default to nanoseconds
- Transactions that are the result of compactions should be sorted before successive transactions
- Panic when reading an invalid transaction file HOT 8
- Support more advanced conflict resolution strategies HOT 1
- Basic curl put command failing HOT 3
- Out of memory error when compacting HOT 3
- ToRecord for String? HOT 7
- add_record_raw has poor documention, may not be usable HOT 2
- Calls to println/eprintln HOT 2
- disregarding "db/tx.17a6f6aeb948b94b", it is zero length HOT 6
- May I support you with Sonnerie's API HOT 1
- Better iterator API HOT 4
- Allow a key to span segments
- Create transactions as O_TMPFILE
- This crate seems good, but why not cargo fmt HOT 6
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 sonnerie.