Skip to content

Commit f07c225

Browse files
fix(core):change delete-on-update to remove-on-update and set default (#9329)
#9305 #9307 #9319 --------- Co-authored-by: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
1 parent 138715c commit f07c225

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+177
-155
lines changed

.github/renovate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["github>hypermodeinc/renovate-config"],
4+
"rangeStrategy": "widen",
45
"ignorePaths": ["contrib/**"]
56
}

.github/workflows/cd-dgraph.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121

2222
jobs:
2323
dgraph-build-amd64:
24-
runs-on: warp-ubuntu-latest-x64-16x
24+
runs-on: warp-ubuntu-latest-x64-4x
2525
timeout-minutes: 15
2626
steps:
2727
- uses: actions/checkout@v4
@@ -121,7 +121,7 @@ jobs:
121121
path: dgraph-standalone-amd64.tar
122122

123123
dgraph-build-arm64:
124-
runs-on: warp-ubuntu-latest-arm64-16x
124+
runs-on: warp-ubuntu-latest-arm64-4x
125125
timeout-minutes: 15
126126
steps:
127127
- uses: actions/checkout@v4
@@ -156,7 +156,7 @@ jobs:
156156
run: |
157157
#!/bin/bash
158158
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
159-
if [[ "$GIT_TAG_NAME" == "v"* ]];
159+
if [[ "$GIT_TAG_NAME" == "v"* ]];
160160
then
161161
echo "this is a release branch"
162162
else
@@ -222,7 +222,7 @@ jobs:
222222

223223
graph-docker-image-and-manifests-push:
224224
needs: [dgraph-build-amd64, dgraph-build-arm64]
225-
runs-on: warp-ubuntu-latest-x64-16x
225+
runs-on: warp-ubuntu-latest-x64-4x
226226
timeout-minutes: 15
227227
steps:
228228
- uses: actions/checkout@v4
@@ -232,7 +232,7 @@ jobs:
232232
run: |
233233
#!/bin/bash
234234
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
235-
if [[ "$GIT_TAG_NAME" == "v"* ]];
235+
if [[ "$GIT_TAG_NAME" == "v"* ]];
236236
then
237237
echo "this is a release branch"
238238
else

.github/workflows/ci-dgraph-core-upgrade-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@ jobs:
4545
#!/bin/bash
4646
# go env settings
4747
export GOPATH=~/go
48-
export DGRAPH_UPGRADE_MAIN_ONLY=true
4948
# move the binary
5049
cp dgraph/dgraph ~/go/bin/dgraph
5150
# run the core upgrade tests
52-
go test -tags=upgrade \
53-
github.com/hypermodeinc/dgraph/v24/ee/acl \
54-
github.com/hypermodeinc/dgraph/v24/worker \
55-
github.com/hypermodeinc/dgraph/v24/query \
56-
-v -timeout=120m -failfast
51+
go test -v -timeout=120m -failfast -tags=upgrade \
52+
github.com/hypermodeinc/dgraph/v24/ee/acl \
53+
github.com/hypermodeinc/dgraph/v24/worker \
54+
github.com/hypermodeinc/dgraph/v24/query
5755
# clean up docker containers after test execution
5856
go clean -testcache
5957
# sleep

.github/workflows/ci-dgraph-fuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
#!/bin/bash
3737
# go env settings
3838
export GOPATH=~/go
39-
go test ./dql -fuzz="Fuzz" -fuzztime="300s" -fuzzminimizetime="120s"
39+
go test -v ./dql -fuzz="Fuzz" -fuzztime="300s" -fuzzminimizetime="120s"

.github/workflows/ci-dgraph-jepsen-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Checkout jepsen repo
2121
uses: actions/checkout@v4
2222
with:
23-
repository: dgraph-io/jepsen
23+
repository: hypermodeinc/jepsen
2424
path: jepsen
2525
ref: master
2626
- name: Set jepsen root

.github/workflows/ci-dgraph-oss-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
# move the binary
4242
cp dgraph/dgraph ~/go/bin/dgraph
4343
# run OSS unit tests
44-
go test -timeout=60m -failfast -tags=oss -count=1 ./...
44+
go test -v -timeout=60m -failfast -tags=oss -count=1 ./...

.github/workflows/ci-dgraph-system-upgrade-tests.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
dgraph-upgrade-tests:
2525
if: github.event.pull_request.draft == false
2626
runs-on: warp-ubuntu-latest-x64-4x
27-
timeout-minutes: 60
27+
timeout-minutes: 90
2828
steps:
2929
- uses: actions/checkout@v4
3030
with:
@@ -45,15 +45,14 @@ jobs:
4545
#!/bin/bash
4646
# go env settings
4747
export GOPATH=~/go
48-
export DGRAPH_UPGRADE_MAIN_ONLY=true
4948
# move the binary
5049
cp dgraph/dgraph ~/go/bin/dgraph
5150
# run the sytem upgrade tests
52-
go test -tags=upgrade github.com/hypermodeinc/dgraph/v24/systest/mutations-and-queries \
53-
github.com/hypermodeinc/dgraph/v24/systest/plugin \
54-
github.com/hypermodeinc/dgraph/v24/systest/license \
55-
github.com/hypermodeinc/dgraph/v24/systest/multi-tenancy \
56-
-v -timeout=120m -failfast
51+
go test -v -timeout=120m -failfast -tags=upgrade \
52+
github.com/hypermodeinc/dgraph/v24/systest/mutations-and-queries \
53+
github.com/hypermodeinc/dgraph/v24/systest/plugin \
54+
github.com/hypermodeinc/dgraph/v24/systest/license \
55+
github.com/hypermodeinc/dgraph/v24/systest/multi-tenancy
5756
# clean up docker containers after test execution
5857
go clean -testcache
5958
# sleep

.github/workflows/ci-dgraph-systest-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ permissions:
2525
jobs:
2626
dgraph-systest-tests:
2727
if: github.event.pull_request.draft == false
28-
runs-on: warp-ubuntu-latest-x64-4x
28+
runs-on: warp-ubuntu-latest-x64-16x
2929
timeout-minutes: 60
3030
steps:
3131
- uses: actions/checkout@v4

.github/workflows/ci-dgraph-upgrade-fixed-versions-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
#!/bin/bash
3232
# go env settings
3333
export GOPATH=~/go
34+
export DGRAPH_UPGRADE_MAIN_ONLY=false
3435
# move the binary
3536
cp dgraph/dgraph ~/go/bin/dgraph
3637
# run the tests

.trunk/trunk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins:
1414
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
1515
runtimes:
1616
enabled:
17-
- go@1.22.11
17+
- go@1.22.12
1818
- node@18.20.5
1919
- python@3.10.8
2020

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ adhere to [Semantic Versioning](https://semver.org) starting `v22.0.0`.
911911
https://github.com/hypermodeinc/dgraph/pull/8479
912912
https://github.com/hypermodeinc/dgraph/pull/8488
913913
https://github.com/hypermodeinc/dgraph/pull/8433)
914-
- [Coveralls](https://coveralls.io/github/dgraph-io/dgraph?branch=main) on CI is enhanced to
914+
- [Coveralls](https://coveralls.io/github/hypermodeinc/dggraph?branch=main) on CI is enhanced to
915915
measure code coverage for integration tests (https://github.com/hypermodeinc/dgraph/pull/8494)
916916
- [**LDBC Benchmarking**](https://ldbcouncil.org) in enabled on
917917
[CI](https://github.com/hypermodeinc/dgraph/actions/workflows/ci-dgraph-ldbc-tests.yml)
@@ -1415,7 +1415,7 @@ https://discuss.dgraph.io/t/dgraph-v22-0-0-rc1-20221003-release-candidate/17839
14151415
- Enabled
14161416
[Load Tests](https://github.com/hypermodeinc/dgraph/actions/workflows/ci-dgraph-load-tests.yml)
14171417
- Enabled [Linters](https://github.com/hypermodeinc/dgraph/actions/workflows/ci-golang-lint.yml)
1418-
- Enabled [Code Coverage](https://coveralls.io/github/dgraph-io/dgraph?branch=main)
1418+
- Enabled [Code Coverage](https://coveralls.io/github/hypermodeinc/dggraph?branch=main)
14191419
- **CI Security**
14201420
- Configured to run with
14211421
[Github Actions](https://github.com/hypermodeinc/dgraph/blob/main/.github/workflows/ci-aqua-security-trivy-tests.yml)
@@ -4813,8 +4813,8 @@ Users can set `port_offset` flag, to modify these fixed ports.
48134813

48144814
- Facets response structure has been modified and is a lot flatter. Facet key is now
48154815
`predicate|facet_name`. Examples for
4816-
[Go client](https://godoc.org/github.com/dgraph-io/dgraph/client#example-Txn-Mutate-Facets) and
4817-
[HTTP](https://dgraph.io/docs/query-language/#facets-edge-attributes).
4816+
[Go client](https://godoc.org/github.com/hypermodeinc/dggraph/client#example-Txn-Mutate-Facets)
4817+
and [HTTP](https://dgraph.io/docs/query-language/#facets-edge-attributes).
48184818
- Query latency is now returned as numeric (ns) instead of string.
48194819
- [`Recurse`](https://dgraph.io/docs/query-language/#recurse-query) is now a directive. So queries
48204820
with `recurse` keyword at root won't work anymore.
@@ -4855,10 +4855,10 @@ Users can set `port_offset` flag, to modify these fixed ports.
48554855
`client.Unmarshal` method also goes away from the Go client. Users can use `json.Unmarshal` for
48564856
unmarshalling the response.
48574857
- Response for predicate of type `geo` can be unmarshalled into a struct. Example
4858-
[here](https://godoc.org/github.com/dgraph-io/dgraph/client#example-package--SetObject).
4858+
[here](https://godoc.org/github.com/hypermodeinc/dggraph/client#example-package--SetObject).
48594859
- `Node` and `Edge` structs go away along with the `SetValue...` methods. We recommend using
4860-
[`SetJson`](https://godoc.org/github.com/dgraph-io/dgraph/client#example-package--SetObject) and
4861-
`DeleteJson` fields to do mutations.
4860+
[`SetJson`](https://godoc.org/github.com/hypermodeinc/dggraph/client#example-package--SetObject)
4861+
and `DeleteJson` fields to do mutations.
48624862
- Examples of how to use transactions using the client can be found at
48634863
https://dgraph.io/docs/clients/#go.
48644864

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
available through your OS package manager)
3131
- Install [Docker](https://docs.docker.com/install/) and
3232
[Docker Compose](https://docs.docker.com/compose/install/).
33-
- [Install Go 1.22.11 or above](https://golang.org/doc/install).
33+
- [Install Go 1.22.12 or above](https://golang.org/doc/install).
3434

3535
### Setup Dgraph from source repo
3636

@@ -111,7 +111,7 @@ Dgraph SHA-256 : 9ce738cd055dfebdef5d68b2a49ea4e062e597799498607dbd1bb618d4886
111111
Commit SHA-1 : 15839b156
112112
Commit timestamp : 2025-01-10 17:56:49 -0500
113113
Branch : username/some-branch-that-im-on
114-
Go version : go1.22.11
114+
Go version : go1.22.12
115115
jemalloc enabled : true
116116

117117
For Dgraph official documentation, visit https://dgraph.io/docs.

SECURITY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Reporting Security Concerns
2+
3+
We take the security of Dgraph very seriously. If you believe you have found a security
4+
vulnerability in Dgraph, we encourage you to let us know right away.
5+
6+
We will investigate all legitimate reports and do our best to quickly fix the problem. Please report
7+
any issues or vulnerabilities via GitHub Security Advisories instead of posting a public issue in
8+
GitHub. You can also send security communications to security@hypermode.com.
9+
10+
Please include the version identifier and details on how the vulnerability can be exploited.

algo/benchmarks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ BenchmarkListIntersectRatio/compressed:IntersectWithLin:ratio=1:size=1000000:ove
167167
BenchmarkListIntersectRatio/compressed:IntersectWithBin:ratio=1:size=1000000:overlap=0.01:-4 30 38617011 ns/op
168168

169169
PASS
170-
ok github.com/dgraph-io/dgraph/algo 206.835s
170+
ok github.com/hypermodeinc/dgraph/algo 206.835s

chunker/README.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ go tool pprof --alloc_objects uidassigner heap.prof
55
Dropped 41 nodes (cum <= 1039438)
66
Showing top 10 nodes out of 31 (cum >= 8566234)
77
flat flat% sum% cum cum%
8-
55529704 26.71% 26.71% 55529704 26.71% github.com/dgraph-io/dgraph/rdf.Parse
9-
28255068 13.59% 40.30% 30647245 14.74% github.com/dgraph-io/dgraph/posting.(*List).getPostingList
8+
55529704 26.71% 26.71% 55529704 26.71% github.com/hypermodeinc/dggraph/rdf.Parse
9+
28255068 13.59% 40.30% 30647245 14.74% github.com/hypermodeinc/dggraph/posting.(*List).getPostingList
1010
20406729 9.82% 50.12% 20406729 9.82% github.com/zond/gotomic.newRealEntryWithHashCode
1111
17777182 8.55% 58.67% 17777182 8.55% strings.makeCutsetFunc
12-
17582839 8.46% 67.13% 17706815 8.52% github.com/dgraph-io/dgraph/loader.(*state).readLines
13-
15139047 7.28% 74.41% 88445933 42.55% github.com/dgraph-io/dgraph/loader.(*state).parseStream
12+
17582839 8.46% 67.13% 17706815 8.52% github.com/hypermodeinc/dggraph/loader.(*state).readLines
13+
15139047 7.28% 74.41% 88445933 42.55% github.com/hypermodeinc/dggraph/loader.(*state).parseStream
1414
12927366 6.22% 80.63% 12927366 6.22% github.com/zond/gotomic.(*element).search
15-
10789028 5.19% 85.82% 66411362 31.95% github.com/dgraph-io/dgraph/posting.GetOrCreate
15+
10789028 5.19% 85.82% 66411362 31.95% github.com/hypermodeinc/dggraph/posting.GetOrCreate
1616
9453856 4.55% 90.37% 9453856 4.55% github.com/zond/gotomic.(*hashHit).search
17-
8566234 4.12% 94.49% 8566234 4.12% github.com/dgraph-io/dgraph/uid.stringKey
17+
8566234 4.12% 94.49% 8566234 4.12% github.com/hypermodeinc/dggraph/uid.stringKey
1818

1919

2020
(pprof) list rdf.Parse
2121
Total: 207887723
22-
ROUTINE ======================== github.com/dgraph-io/dgraph/rdf.Parse in /home/mrjn/go/src/github.com/dgraph-io/dgraph/rdf/parse.go
22+
ROUTINE ======================== github.com/hypermodeinc/dggraph/rdf.Parse in /home/mrjn/go/src/github.com/hypermodeinc/dggraph/rdf/parse.go
2323
55529704 55529704 (flat, cum) 26.71% of Total
2424
. . 118: }
2525
. . 119: return val[1 : len(val)-1]
@@ -43,14 +43,14 @@ Showing top 10 nodes out of 62 (cum >= 18180150)
4343
flat flat% sum% cum cum%
4444
103445194 18.46% 18.46% 103445194 18.46% github.com/Sirupsen/logrus.(*Entry).WithFields
4545
65448918 11.68% 30.14% 163184489 29.12% github.com/Sirupsen/logrus.(*Entry).WithField
46-
48366300 8.63% 38.77% 203838187 36.37% github.com/dgraph-io/dgraph/posting.(*List).get
47-
39789719 7.10% 45.87% 49276181 8.79% github.com/dgraph-io/dgraph/posting.(*List).getPostingList
48-
36642638 6.54% 52.41% 36642638 6.54% github.com/dgraph-io/dgraph/lex.NewLexer
46+
48366300 8.63% 38.77% 203838187 36.37% github.com/hypermodeinc/dggraph/posting.(*List).get
47+
39789719 7.10% 45.87% 49276181 8.79% github.com/hypermodeinc/dggraph/posting.(*List).getPostingList
48+
36642638 6.54% 52.41% 36642638 6.54% github.com/hypermodeinc/dggraph/lex.NewLexer
4949
35190301 6.28% 58.69% 35190301 6.28% github.com/google/flatbuffers/go.(*Builder).growByteBuffer
5050
31392455 5.60% 64.29% 31392455 5.60% github.com/zond/gotomic.newRealEntryWithHashCode
5151
25895676 4.62% 68.91% 25895676 4.62% github.com/zond/gotomic.(*element).search
52-
18546971 3.31% 72.22% 72863016 13.00% github.com/dgraph-io/dgraph/loader.(*state).parseStream
53-
18090764 3.23% 75.45% 18180150 3.24% github.com/dgraph-io/dgraph/loader.(*state).readLines
52+
18546971 3.31% 72.22% 72863016 13.00% github.com/hypermodeinc/dggraph/loader.(*state).parseStream
53+
18090764 3.23% 75.45% 18180150 3.24% github.com/hypermodeinc/dggraph/loader.(*state).readLines
5454

5555
After a few more discussions, I realized that lexer didn't need to be allocated on the heap.
5656
So, I switched it to be allocated on stack. These are the results.
@@ -62,14 +62,14 @@ Entering interactive mode (type "help" for commands)
6262
Dropped 73 nodes (cum <= 8.48MB)
6363
Showing top 10 nodes out of 52 (cum >= 161.50MB)
6464
flat flat% sum% cum cum%
65-
304.56MB 17.95% 17.95% 304.56MB 17.95% github.com/dgraph-io/dgraph/posting.NewList
65+
304.56MB 17.95% 17.95% 304.56MB 17.95% github.com/hypermodeinc/dggraph/posting.NewList
6666
209.55MB 12.35% 30.30% 209.55MB 12.35% github.com/Sirupsen/logrus.(*Entry).WithFields
6767
207.55MB 12.23% 42.54% 417.10MB 24.58% github.com/Sirupsen/logrus.(*Entry).WithField
68-
108MB 6.37% 48.90% 108MB 6.37% github.com/dgraph-io/dgraph/uid.(*lockManager).newOrExisting
68+
108MB 6.37% 48.90% 108MB 6.37% github.com/hypermodeinc/dggraph/uid.(*lockManager).newOrExisting
6969
88MB 5.19% 54.09% 88MB 5.19% github.com/zond/gotomic.newMockEntry
7070
85.51MB 5.04% 59.13% 85.51MB 5.04% github.com/google/flatbuffers/go.(*Builder).growByteBuffer
71-
78.01MB 4.60% 63.73% 78.01MB 4.60% github.com/dgraph-io/dgraph/posting.Key
72-
78.01MB 4.60% 68.32% 78.51MB 4.63% github.com/dgraph-io/dgraph/uid.stringKey
71+
78.01MB 4.60% 63.73% 78.01MB 4.60% github.com/hypermodeinc/dggraph/posting.Key
72+
78.01MB 4.60% 68.32% 78.51MB 4.63% github.com/hypermodeinc/dggraph/uid.stringKey
7373
76MB 4.48% 72.80% 76MB 4.48% github.com/zond/gotomic.newRealEntryWithHashCode
7474
73.50MB 4.33% 77.14% 161.50MB 9.52% github.com/zond/gotomic.(*Hash).getBucketByIndex
7575

contrib/manual_tests/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ readonly ENCRYPTION_KEY_PATH="${DGRAPH_PATH}/encryption_key_file"
1414
readonly ACL_SECRET_PATH="${DGRAPH_PATH}/acl_secret_file"
1515
readonly TLS_PATH="${DGRAPH_PATH}/tls"
1616

17-
readonly DATASET_1MILLION_FILE_URL='https://github.com/dgraph-io/benchmarks/blob/master/data/1million.rdf.gz?raw=true'
17+
readonly DATASET_1MILLION_FILE_URL='https://github.com/hypermodeinc/dgraph-benchmarks/blob/main/data/1million.rdf.gz?raw=true'
1818
readonly DATASET_1MILLION_FILE_PATH="${DATA_PATH}/1million.rdf.gz"
1919

20-
readonly DATASET_1MILLION_SCHEMA_URL='https://github.com/dgraph-io/benchmarks/blob/master/data/1million.schema?raw=true'
20+
readonly DATASET_1MILLION_SCHEMA_URL='https://github.com/hypermodeinc/dgraph-benchmarks/blob/main/data/1million.schema?raw=true'
2121
readonly DATASET_1MILLION_SCHEMA_PATH="${DATA_PATH}/1million.schema"
2222

2323
source "log.sh"

dgraph/cmd/alpha/run.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,15 @@ they form a Raft group and provide synchronous replication.
145145
Flag("percentage",
146146
"Cache percentages summing up to 100 for various caches (FORMAT: PostingListCache,"+
147147
"PstoreBlockCache,PstoreIndexCache)").
148-
Flag("delete-on-updates",
149-
"When set as true, we would delete the key from the cache once it's updated. If it's not "+
150-
"we would update the value inside the cache. If the cache gets too full, it starts"+
151-
" to get slow. So if your usecase has a lot of heavy mutations, this should be set"+
152-
" as true. If you are modifying same data again and again, this should be set as"+
153-
" false").
148+
Flag("remove-on-update",
149+
"Dgraph implements a read-through cache (using Ristretto) to optimize query performance. On "+
150+
"mutation, the new value is first written to disk and then updated in the cache "+
151+
"before the transaction completes to ensure there are no stale reads during parallel "+
152+
"transactions. In mutation-heavy use cases, it may be more advantageous to remove "+
153+
"the cache entry on mutation instead of updating the value, as this executes ~14\\%"+
154+
"faster on write. The new value will be added to the cache the first time it is "+
155+
"queried, slightly delaying that read. To use this approach, set the --cache "+
156+
"remove-on-update flag.").
154157
String())
155158

156159
flag.String("raft", worker.RaftDefaults, z.NewSuperFlagHelp(worker.RaftDefaults).
@@ -639,7 +642,7 @@ func run() {
639642
x.AssertTruef(totalCache >= 0, "ERROR: Cache size must be non-negative")
640643

641644
cachePercentage := cache.GetString("percentage")
642-
deleteOnUpdates := cache.GetBool("delete-on-updates")
645+
removeOnUpdate := cache.GetBool("remove-on-update")
643646
cachePercent, err := x.GetCachePercentages(cachePercentage, 3)
644647
x.Check(err)
645648
postingListCacheSize := (cachePercent[0] * (totalCache << 20)) / 100
@@ -662,7 +665,7 @@ func run() {
662665
WALDir: Alpha.Conf.GetString("wal"),
663666
CacheMb: totalCache,
664667
CachePercentage: cachePercentage,
665-
DeleteOnUpdates: deleteOnUpdates,
668+
RemoveOnUpdate: removeOnUpdate,
666669

667670
MutationsMode: worker.AllowMutations,
668671
AuthToken: security.GetString("token"),
@@ -790,7 +793,7 @@ func run() {
790793
// Posting will initialize index which requires schema. Hence, initialize
791794
// schema before calling posting.Init().
792795
schema.Init(worker.State.Pstore)
793-
posting.Init(worker.State.Pstore, postingListCacheSize, deleteOnUpdates)
796+
posting.Init(worker.State.Pstore, postingListCacheSize, removeOnUpdate)
794797
defer posting.Cleanup()
795798
worker.Init(worker.State.Pstore)
796799

dgraphtest/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ func AllUpgradeCombos(v20 bool) []UpgradeCombo {
7474
// In mainCombos list, we keep latest version to current HEAD as well as
7575
// older versions of dgraph to ensure that a change does not cause failures.
7676
mainCombos := []UpgradeCombo{
77-
{"v23.1.0", localVersion, BackupRestore},
78-
{"v23.1.0", localVersion, InPlace},
77+
{"v24.0.0", localVersion, BackupRestore},
78+
{"v24.0.0", localVersion, InPlace},
7979
}
8080

8181
if v20 {
@@ -90,10 +90,10 @@ func AllUpgradeCombos(v20 bool) []UpgradeCombo {
9090
}...)
9191
}
9292

93-
if os.Getenv("DGRAPH_UPGRADE_MAIN_ONLY") == "true" {
94-
return mainCombos
95-
} else {
93+
if os.Getenv("DGRAPH_UPGRADE_MAIN_ONLY") == "false" {
9694
return fixedVersionCombos
95+
} else {
96+
return mainCombos
9797
}
9898
}
9999

dgraphtest/dgraph.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,12 @@ func mountBinary(c *LocalCluster) (mount.Mount, error) {
421421
}
422422

423423
// ShouldSkipTest skips a given test if clusterVersion < minVersion
424-
func ShouldSkipTest(t *testing.T, minVersion, clusterVersion string) error {
424+
func ShouldSkipTest(t *testing.T, minVersion, clusterVersion string) {
425425
supported, err := IsHigherVersion(clusterVersion, minVersion)
426426
if err != nil {
427427
t.Fatal(err)
428428
}
429429
if !supported {
430430
t.Skipf("test is valid for commits greater than [%v]", minVersion)
431431
}
432-
return nil
433432
}

0 commit comments

Comments
 (0)