Upgrade to LevelDB 1.14.0 to fix LevelDB bugs.

This tentatively fixes https://github.com/prometheus/prometheus/issues/368 due
to an upstream bugfix in snapshotted LevelDB iterator handling, which got fixed
in LevelDB 1.14.0:

https://code.google.com/p/leveldb/issues/detail?id=200

Change-Id: Ib0cc67b7d3dc33913a1c16736eff32ef702c63bf
This commit is contained in:
Julius Volz 2013-12-02 13:36:47 +01:00
parent db015de65b
commit 6b7de31a3c
2 changed files with 35 additions and 14 deletions

View file

@ -43,7 +43,7 @@ GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH)
GO = $(GOENV) $(GOCC) GO = $(GOENV) $(GOCC)
GOFMT = $(GOROOT)/bin/gofmt GOFMT = $(GOROOT)/bin/gofmt
LEVELDB_VERSION := 1.12.0 LEVELDB_VERSION := 1.14.0
PROTOCOL_BUFFERS_VERSION := 2.5.0 PROTOCOL_BUFFERS_VERSION := 2.5.0
SNAPPY_VERSION := 1.1.0 SNAPPY_VERSION := 1.1.0

View file

@ -219,22 +219,43 @@ func TestCompaction(t *testing.T) {
uncompactedChunks: 9, uncompactedChunks: 9,
compactedChunks: 3, compactedChunks: 3,
}, },
// BUG: This case crashes! See: // BEFORE COMPACTION:
// https://github.com/prometheus/prometheus/issues/368
// Fix this!
// //
//{ // Chunk size | Fingerprint | Samples
// leveldbChunkSize: 5, // 5 | A | 1 .. 5
// numTimeseries: 3, // 5 | A | 6 .. 10
// samplesPerTs: 20, // 5 | A | 11 .. 15
// 5 | A | 16 .. 20
// 5 | B | 1 .. 5
// 5 | B | 6 .. 10
// 5 | B | 11 .. 15
// 5 | B | 16 .. 20
// 5 | C | 1 .. 5
// 5 | C | 6 .. 10
// 5 | C | 11 .. 15
// 5 | C | 16 .. 20
//
// AFTER COMPACTION:
//
// Chunk size | Fingerprint | Samples
// 10 | A | 1 .. 15
// 10 | A | 16 .. 20
// 10 | B | 1 .. 15
// 10 | B | 16 .. 20
// 10 | C | 1 .. 15
// 10 | C | 16 .. 20
{
leveldbChunkSize: 5,
numTimeseries: 3,
samplesPerTs: 20,
// ignoreYoungerThan: time.Minute, ignoreYoungerThan: time.Minute,
// maximumMutationPoolBatch: 30, maximumMutationPoolBatch: 30,
// minimumGroupSize: 10, minimumGroupSize: 10,
// uncompactedChunks: 12, uncompactedChunks: 12,
// compactedChunks: 9, compactedChunks: 6,
//}, },
} }
for _, s := range scenarios { for _, s := range scenarios {