Fixing bus errors on a full disk
[?]
Mar 4, 2021, 9:51 AM
WTXLZDYIS2AQZFOO7WCSFGRK235NR2VSOI2LOCORWF5WRS3E76UACDependencies
- [2]
DASFQGORDebugging - [3]
WS4ZQM4RDebugging, tests, etc. - [4]
OP6SVMODResetting history - [5]
G4JEQLLXDebugging synchronisation - [6]
YWFYZNLZCleanup + inter-process concurrency - [7]
XEU2QVLCDebugging after plugging this into Pijul - [8]
OHUZ73MKVersions - [9]
E4MD6T3LProofreading and commenting of this crate (massive bug fixes included) - [10]
PRDUE4YACleanup + published on crates.io - [11]
L5CVF6UJDebugging - [12]
YXKP4AIWNew file locks, with multiple sets of free pages - [13]
5LSYTRQ6More docs, example, and fixing the free page diagnostic function for mutable transactions
Change contents
- edit in sanakirja/src/environment/muttxn.rs at line 269
// Flush all the maps.for m in maps.iter_mut() {m.flush()?} - replacement in sanakirja/src/environment/muttxn.rs at line 314
for m in maps.iter_mut() {m.flush()?}maps[0].flush_range(0, env.roots.len() * PAGE_SIZE)?; - replacement in sanakirja/src/environment/muttxn.rs at line 447
let data = unsafe { self.env.borrow().find_offset(offset) };let data = unsafe { self.env.borrow().find_offset(offset)? }; - replacement in sanakirja/src/environment/muttxn.rs at line 457
let data = unsafe { self.env.borrow().find_offset(offset) };let data = unsafe { self.env.borrow().find_offset(offset)? }; - replacement in sanakirja/src/environment/muttxn.rs at line 466
let data = unsafe { self.env.borrow().find_offset(offset) };let data = unsafe { self.env.borrow().find_offset(offset)? }; - replacement in sanakirja/src/environment/muttxn.rs at line 573
let data = self.env.borrow().find_offset(off);let data = self.env.borrow().find_offset(off)?; - edit in sanakirja/src/environment/mod.rs at line 47
Ok(())}#[cfg(feature = "mmap")]fn flush_range(&self, a: usize, b: usize) -> Result<(), Error> {Ok(self.mmap.flush_range(a, b)?)}#[cfg(not(feature = "mmap"))]fn flush_range(&self, a: usize, b: usize) -> Result<(), Error> { - edit in sanakirja/src/environment/mod.rs at line 339
}}#[cfg(feature = "mmap")]fn fallocate(&self, length: u64) -> Result<(), Error> {if let Some(ref file) = self.file {file.allocate(length)? - edit in sanakirja/src/environment/mod.rs at line 347
Ok(())}#[cfg(not(feature = "mmap"))]fn fallocate(&self, length: u64) -> Result<(), Error> {Ok(()) - replacement in sanakirja/src/environment/mod.rs at line 358
unsafe fn find_offset(&self, mut offset: u64) -> *mut u8 {unsafe fn find_offset(&self, mut offset: u64) -> Result<*mut u8, Error> { - edit in sanakirja/src/environment/mod.rs at line 361
self.fallocate(offset + PAGE_SIZEU64)?; - replacement in sanakirja/src/environment/mod.rs at line 369
return mmaps[i].ptr.add(offset as usize);return Ok(mmaps[i].ptr.add(offset as usize)); - replacement in sanakirja/src/environment/mod.rs at line 549
let data = self.env.borrow().find_offset(off);let data = self.env.borrow().find_offset(off)?; - replacement in sanakirja/Cargo.toml at line 3
version = "1.1.2"version = "1.1.6" - replacement in sanakirja/Cargo.toml at line 29
sanakirja-core = { path = "../sanakirja-core", version = "1.1.0" }sanakirja-core = { path = "../sanakirja-core", version = "1.1.1" }