Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pebble flags #2220

Closed
wants to merge 61 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d24ee4c
initial commit
Sep 11, 2023
d578d00
Merge remote-tracking branch 'upstream/dev' into pebble
Sep 11, 2023
db2eeeb
update pebble dep
Sep 11, 2023
0983042
Merge remote-tracking branch 'upstream/dev' into pebble
Sep 12, 2023
528cc2d
appease linter
Sep 12, 2023
1bcfa65
nit
Sep 12, 2023
73a934f
nit
Sep 12, 2023
1e094b4
nit
Sep 12, 2023
5f39300
Merge branch 'dev' into pebble
Sep 12, 2023
d937e6c
Merge branch 'dev' into pebble
Sep 15, 2023
721275e
nit
Sep 15, 2023
5a8d855
Merge branch 'dev' into pebble
Sep 18, 2023
9f7665b
fix tests
Sep 18, 2023
1db44c4
nit
Sep 18, 2023
7e4cf61
Merge branch 'dev' into pebble
Sep 19, 2023
4051e88
nit
Sep 19, 2023
4bc0630
Merge branch 'dev' into pebble
Sep 22, 2023
662975f
Merge branch 'dev' into pebble
Sep 25, 2023
cd0a8e2
appease linter
Sep 25, 2023
261e710
Merge branch 'dev' into pebble
dhrubabasu Sep 27, 2023
59a8615
Merge remote-tracking branch 'upstream/dev' into pebble
Oct 2, 2023
a710f54
remove TODO
Oct 2, 2023
f21c81d
remove unneeded var
Oct 2, 2023
cc7a15e
unexport error
Oct 2, 2023
f9192ed
atomic bool --> bool
Oct 2, 2023
155edc9
merged
StephenButtolph Oct 24, 2023
72a249d
match pebble version
StephenButtolph Oct 24, 2023
4b08b25
fix test:
Oct 25, 2023
b8fa698
change pebble opening log; edit comment
Oct 25, 2023
a1b7fba
pebbledb.New nit
Oct 25, 2023
6b93c90
Lock --> RLock in Put, Delete
Oct 25, 2023
610e7f8
iterator nits
Oct 25, 2023
fc91cd1
Compact Lock --> RLock
Oct 25, 2023
5aff591
prefixBounds --> keyRange and prefixToUpperBound
Oct 25, 2023
49499fa
Merge remote-tracking branch 'upstream/dev' into pebble
Oct 25, 2023
bba3048
remove unneeded iterator creator code
Oct 25, 2023
3ffc6a8
remove unneeded check in iter.Next
Oct 25, 2023
a8ff7b8
remove unused var
Oct 25, 2023
c6bacc7
change switch order in iter.Next to not overwrite iter error
Oct 25, 2023
b886790
remove unneeded lock grab and db closed check in iter.Next
Oct 25, 2023
f771665
prevent Compact panic
Oct 25, 2023
3412216
fix default MaxConcurrentCompactions; fix compaction iterator leak; a…
Oct 25, 2023
f0e3f2e
cleanup and comments
Oct 25, 2023
c4d1a87
add Key and Value invariant on database.Iterator
Oct 25, 2023
d379e77
spelling is hard
Oct 25, 2023
8eea9eb
make pebble.New take in config bytes instead of config
Oct 25, 2023
c350116
Merge remote-tracking branch 'upstream/dev' into pebble
Oct 25, 2023
b64de08
os.MkDirTemp --> t.TempDir
Oct 25, 2023
b1768c1
remove unneeded file removal
Oct 25, 2023
afd88e3
Close db
StephenButtolph Oct 25, 2023
b360819
add flags for pebble; only unmarshal config bytes if given
Oct 25, 2023
6f89805
Merge remote-tracking branch 'upstream/dev' into pebble-2
Oct 25, 2023
9b4343f
Merge branch 'dev' into pebble-2
Oct 26, 2023
417785f
comments
Oct 26, 2023
da99730
Merge branch 'pebble-2' of github.com:ava-labs/avalanchego into pebble-2
Oct 26, 2023
fbfdc6d
Merge branch 'dev' into pebble-2
Oct 26, 2023
70d3420
Merge branch 'dev' into pebble-2
Oct 27, 2023
f41856a
Merge branch 'dev' into pebble-2
Oct 27, 2023
b49340b
nit move name declaration
Oct 30, 2023
c18a208
Merge branch 'dev' into pebble-2
Oct 30, 2023
3a71f38
Merge branch 'dev' into pebble-2
Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unneeded lock grab and db closed check in iter.Next
Dan Laine committed Oct 25, 2023
commit b88679090c21a27dc8293fe5a47719923c0777db
6 changes: 1 addition & 5 deletions database/pebble/iterator.go
Original file line number Diff line number Diff line change
@@ -42,18 +42,14 @@ type iter struct {

// Must not be called with [db.lock] held.
func (it *iter) Next() bool {
it.db.lock.RLock()
dbClosed := it.db.closed
it.db.lock.RUnlock()

it.lock.Lock()
defer it.lock.Unlock()

switch {
case it.err != nil:
it.hasNext = false
return false
case it.closed || dbClosed:
case it.closed:
it.hasNext = false
it.err = database.ErrClosed
return false