Skip to content

Conversation

njwhite
Copy link

@njwhite njwhite commented Aug 29, 2014

Fixes #136. References to a DBImpl's VersionSet can be left in the
LRUCache, so delete the cache before the VersionSet.

Also stores the current version a local variable when references several times in a function to avoid race conditions.

Fixes google#136 - now stores the current version a local variable when references several
times in a function to avoid race conditions.
@cmumford cmumford force-pushed the master branch 2 times, most recently from 735fc09 to 803d692 Compare September 17, 2014 18:39
@FreemanFeng FreemanFeng mentioned this pull request Dec 12, 2014
kumagi pushed a commit to kumagi/leveldb that referenced this pull request Apr 20, 2015
Don't open a new cursor for each background write in WiredTiger.
cmumford pushed a commit that referenced this pull request Mar 31, 2016
…es that have been split, as in a [] input task split.

Detailed description:

Suppose an input split is generated between two leveldb record blocks and the preceding block ends with null padding.

A reader that previously read at least 1 record within the first block (before encountering the padding) upon trying to read the next record, will successfully and correctly read the next logical record from the subsequent block, but will return a last record offset pointing to the padding in the first block.

When this happened in a [], it resulted in duplicate records being handled at what appeared to be different offsets that were separated by only a few bytes.

This behavior is only observed when at least 1 record was read from the first block before encountering the padding. If the initial offset for a reader was within the padding, the correct record offset would be reported, namely the offset within the second block.

The tests failed to catch this scenario/bug, because each read test only read a single record with an initial offset. This CL adds an explicit test case for this scenario, and modifies the test structure to read all remaining records in the test case after an initial offset is specified.  Thus an initial offset that jumps to record #3, with 5 total records in the test file, will result in reading 2 records, and validating the offset of each of them in order to pass successfully.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115338487
isaachier added a commit to isaachier/leveldb that referenced this pull request Dec 4, 2017
@cmumford
Copy link
Contributor

@googlebot rescan

@cmumford
Copy link
Contributor

@njwhite as of c00e177 DBImpl::versions_ is protected by a mutex. I don't see how this fixes any issues, but if you have a reproduction case please reopen and attach as we would be very interested in this.

@cmumford cmumford closed this May 16, 2019
@orrorcol orrorcol mentioned this pull request Dec 15, 2019
maochongxin pushed a commit to maochongxin/leveldb that referenced this pull request Jul 21, 2022
Fix int64_t_t typo in README code example
symious pushed a commit to VisitRe/leveldb that referenced this pull request Jul 14, 2025
…es that have been split, as in a [] input task split.

Detailed description:

Suppose an input split is generated between two leveldb record blocks and the preceding block ends with null padding.

A reader that previously read at least 1 record within the first block (before encountering the padding) upon trying to read the next record, will successfully and correctly read the next logical record from the subsequent block, but will return a last record offset pointing to the padding in the first block.

When this happened in a [], it resulted in duplicate records being handled at what appeared to be different offsets that were separated by only a few bytes.

This behavior is only observed when at least 1 record was read from the first block before encountering the padding. If the initial offset for a reader was within the padding, the correct record offset would be reported, namely the offset within the second block.

The tests failed to catch this scenario/bug, because each read test only read a single record with an initial offset. This CL adds an explicit test case for this scenario, and modifies the test structure to read all remaining records in the test case after an initial offset is specified.  Thus an initial offset that jumps to record google#3, with 5 total records in the test file, will result in reading 2 records, and validating the offset of each of them in order to pass successfully.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115338487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CompactionInputErrorParanoid fails on ARM
3 participants