Merge pull request #11623 from codesome/2403

Cut v2.40.3
This commit is contained in:
Ganesh Vernekar 2022-11-24 11:01:58 +05:30 committed by GitHub
commit 84e95d8cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 18 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 2.40.3 / 2022-11-23
* [BUGFIX] TSDB: Fix compaction after a deletion is called. #11623
## 2.40.2 / 2022-11-16
* [BUGFIX] UI: Fix black-on-black metric name color in dark mode. #11572

View File

@ -1 +1 @@
2.40.2
2.40.3

View File

@ -2960,6 +2960,24 @@ func TestCompactHead(t *testing.T) {
require.NoError(t, seriesSet.Err())
}
// TestCompactHeadWithDeletion tests https://github.com/prometheus/prometheus/issues/11585.
func TestCompactHeadWithDeletion(t *testing.T) {
db, err := Open(t.TempDir(), log.NewNopLogger(), prometheus.NewRegistry(), nil, nil)
require.NoError(t, err)
app := db.Appender(context.Background())
_, err = app.Append(0, labels.FromStrings("a", "b"), 10, rand.Float64())
require.NoError(t, err)
require.NoError(t, app.Commit())
err = db.Delete(0, 100, labels.MustNewMatcher(labels.MatchEqual, "a", "b"))
require.NoError(t, err)
// This recreates the bug.
require.NoError(t, db.CompactHead(NewRangeHead(db.Head(), 0, 100)))
require.NoError(t, db.Close())
}
func deleteNonBlocks(dbDir string) error {
dirs, err := os.ReadDir(dbDir)
if err != nil {

View File

@ -705,12 +705,7 @@ func (p *populateWithDelChunkSeriesIterator) Next() bool {
if valueType == chunkenc.ValNone {
if err := p.currDelIter.Err(); err != nil {
p.err = errors.Wrap(err, "iterate chunk while re-encoding")
return false
}
// Empty chunk, this should not happen, as we assume full
// deletions being filtered before this iterator.
p.err = errors.New("populateWithDelChunkSeriesIterator: unexpected empty chunk found while rewriting chunk")
return false
}

View File

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/codemirror-promql",
"version": "0.40.2",
"version": "0.40.3",
"description": "a CodeMirror mode for the PromQL language",
"types": "dist/esm/index.d.ts",
"module": "dist/esm/index.js",
@ -29,7 +29,7 @@
},
"homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md",
"dependencies": {
"@prometheus-io/lezer-promql": "^0.40.2",
"@prometheus-io/lezer-promql": "^0.40.3",
"lru-cache": "^6.0.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/lezer-promql",
"version": "0.40.2",
"version": "0.40.3",
"description": "lezer-based PromQL grammar",
"main": "index.cjs",
"type": "module",

View File

@ -28,10 +28,10 @@
},
"module/codemirror-promql": {
"name": "@prometheus-io/codemirror-promql",
"version": "0.40.2",
"version": "0.40.3",
"license": "Apache-2.0",
"dependencies": {
"@prometheus-io/lezer-promql": "^0.40.2",
"@prometheus-io/lezer-promql": "^0.40.3",
"lru-cache": "^6.0.0"
},
"devDependencies": {
@ -61,7 +61,7 @@
},
"module/lezer-promql": {
"name": "@prometheus-io/lezer-promql",
"version": "0.40.2",
"version": "0.40.3",
"license": "Apache-2.0",
"devDependencies": {
"@lezer/generator": "^1.1.1",
@ -17625,7 +17625,7 @@
},
"react-app": {
"name": "@prometheus-io/app",
"version": "0.40.2",
"version": "0.40.3",
"dependencies": {
"@codemirror/autocomplete": "^6.2.0",
"@codemirror/commands": "^6.1.0",
@ -17643,7 +17643,7 @@
"@lezer/lr": "^1.2.3",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.2",
"@prometheus-io/codemirror-promql": "^0.40.3",
"bootstrap": "^4.6.2",
"css.escape": "^1.5.1",
"downshift": "^6.1.11",
@ -19883,7 +19883,7 @@
"@lezer/lr": "^1.2.3",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.2",
"@prometheus-io/codemirror-promql": "^0.40.3",
"@testing-library/react-hooks": "^7.0.2",
"@types/enzyme": "^3.10.12",
"@types/flot": "0.0.32",
@ -19935,7 +19935,7 @@
"@lezer/common": "^1.0.1",
"@lezer/highlight": "^1.1.0",
"@lezer/lr": "^1.2.3",
"@prometheus-io/lezer-promql": "^0.40.2",
"@prometheus-io/lezer-promql": "^0.40.3",
"@types/lru-cache": "^5.1.1",
"isomorphic-fetch": "^3.0.0",
"lru-cache": "^6.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/app",
"version": "0.40.2",
"version": "0.40.3",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.2.0",
@ -19,7 +19,7 @@
"@lezer/common": "^1.0.1",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.2",
"@prometheus-io/codemirror-promql": "^0.40.3",
"bootstrap": "^4.6.2",
"css.escape": "^1.5.1",
"downshift": "^6.1.11",