panic: runtime error: slice bounds out of range [:4172166156] with capacity 1963281920
goroutine 21418 [running]:
github.com/dgraph-io/badger/v2/table.(*Builder).addBlockToIndex(...)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/table/builder.go:296
github.com/dgraph-io/badger/v2/table.(*Builder).finishBlock(0xc1b382c180)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/table/builder.go:290 +0x64d
github.com/dgraph-io/badger/v2/table.(*Builder).Add(0xc1b382c180, 0xc18ac559c0, 0x1e, 0x20, 0x440, 0x0, 0xc13621a025, 0x154, 0x13db, 0x0, …)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/table/builder.go:333 +0xf8
github.com/dgraph-io/badger/v2.(*levelsController).compactBuildTables(0xc0001c2070, 0x2, 0x1b81ee0, 0xc06930d040, 0xc00018e8a0, 0xc00018e900, 0xc21da10768, 0x1, 0x1, 0xc21da10770, …)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/levels.go:613 +0x90b
github.com/dgraph-io/badger/v2.(*levelsController).runCompactDef(0xc0001c2070, 0x2, 0x1b81ee0, 0xc06930d040, 0xc00018e8a0, 0xc00018e900, 0xc21da10768, 0x1, 0x1, 0xc21da10770, …)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/levels.go:862 +0xe1
github.com/dgraph-io/badger/v2.(*levelsController).doCompact(0xc0001c2070, 0x2, 0x3ff0303383000000, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/levels.go:931 +0x49d
github.com/dgraph-io/badger/v2.(*levelsController).runWorker(0xc0001c2070, 0xc01e3893e0)
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/levels.go:368 +0x2fd
created by github.com/dgraph-io/badger/v2.(*levelsController).startCompact
/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200528205344-e7b6e76f96e8/levels.go:343 +0x88
“log/alpha1.log” 29871L, 2672378C
And i also check the p directory, there is no table near 4G size, top size file list is as followings
{“counter”:“27638547”,“groups”:{“1”:{“members”:{“1”:{“id”:“1”,“groupId”:1,“addr”:“172.21.46.35:7080”,“leader”:true,“lastUpdate”:“1593611550”}},“tablets”:{“chl”:{“groupId”:1,“predicate”:“chl”,“space”:“4695775026”},“dgraph.graphql.schema”:{“groupId”:1,“predicate”:“dgraph.graphql.schema”},“dgraph.graphql.xid”:{“groupId”:1,“predicate”:“dgraph.graphql.xid”},“dgraph.type”:{“groupId”:1,“predicate”:“dgraph.type”,“space”:“41421216460”},“extmsg”:{“groupId”:1,“predicate”:“extmsg”},“from”:{“groupId”:1,“predicate”:“from”,“space”:“223127171705”},“net”:{“groupId”:1,“predicate”:“net”,“space”:“4220898548”},“title”:{“groupId”:1,“predicate”:“title”,“space”:“12325089358”},“to”:{“groupId”:1,“predicate”:“to”,“space”:“13864305792”},“withExpect”:{“groupId”:1,“predicate”:“withExpect”,“space”:“10265741211”}},“snapshotTs”:“54649802”,“checksum”:“3759641937265695043”},“2”:{“members”:{“2”:{“id”:“2”,“groupId”:2,“addr”:“172.21.46.43:7080”,“leader”:true,“lastUpdate”:“1593611555”}},“tablets”:{“aid”:{“groupId”:2,“predicate”:“aid”,“space”:“12185695440”},“gid_gps”:{“groupId”:2,“predicate”:“gid_gps”,“space”:“2246383293”},“gid_ip”:{“groupId”:2,“predicate”:“gid_ip”,“space”:“4275951255”},“gid_user”:{“groupId”:2,“predicate”:“gid_user”,“space”:“10186607933”},“src”:{“groupId”:2,“predicate”:“src”,“space”:“9066055157”}},“snapshotTs”:“54848420”,“checksum”:“16815000284943703647”},“3”:{“members”:{“3”:{“id”:“3”,“groupId”:3,“addr”:“172.21.46.44:7080”,“leader”:true,“lastUpdate”:“1593611557”}},“tablets”:{“gid_device”:{“groupId”:3,“predicate”:“gid_device”,“space”:“5483695993”},“gid_did”:{“groupId”:3,“predicate”:“gid_did”,“space”:“304280668”},“gid_idfa”:{“groupId”:3,“predicate”:“gid_idfa”,“space”:“1199109308”},“gid_wifi”:{“groupId”:3,“predicate”:“gid_wifi”,“space”:“1457055681”},“loc”:{“groupId”:3,“predicate”:“loc”,“space”:“16879986572”},“status”:{“groupId”:3,“predicate”:“status”,“space”:“354027403”},“t”:{“groupId”:3,“predicate”:“t”,“space”:“10332890221”}},“snapshotTs”:“55094804”,“checksum”:“3247556968549744124”},“4”:{“members”:{“4”:{“id”:“4”,“groupId”:4,“addr”:“172.21.46.59:7080”,“leader”:true,“lastUpdate”:“1593611559”}},“tablets”:{“gid_brand”:{“groupId”:4,“predicate”:“gid_brand”,“moveTs”:“39”},“gid_job”:{“groupId”:4,“predicate”:“gid_job”,“space”:“3165219418”},“gid_mac”:{“groupId”:4,“predicate”:“gid_mac”,“space”:“1763035672”},“msg”:{“groupId”:4,“predicate”:“msg”,“space”:“176492074”},“pl”:{“groupId”:4,“predicate”:“pl”,“space”:“9285853378”},“withDID”:{“groupId”:4,“predicate”:“withDID”,“space”:“114209649”},“withDeviceId”:{“groupId”:4,“predicate”:“withDeviceId”,“space”:“14719347936”},“withIdfa”:{“groupId”:4,“predicate”:“withIdfa”,“moveTs”:“24”},“withIp”:{“groupId”:4,“predicate”:“withIp”,“space”:“14052854988”},“withMac”:{“groupId”:4,“predicate”:“withMac”,“space”:“3683865987”}},“snapshotTs”:“54637590”,“checksum”:“876440663310665151”},“5”:{“members”:{“5”:{“id”:“5”,“groupId”:5,“addr”:“172.21.46.65:7080”,“leader”:true,“lastUpdate”:“1593611561”}},“tablets”:{“bg”:{“groupId”:5,“predicate”:“bg”,“space”:“10036594964”},“gid_company”:{“groupId”:5,“predicate”:“gid_company”,“moveTs”:“40”},“gid_expect”:{“groupId”:5,“predicate”:“gid_expect”,“space”:“5837675755”},“gid_interview”:{“groupId”:5,“predicate”:“gid_interview”,“space”:“174559486”},“withBrand”:{“groupId”:5,“predicate”:“withBrand”,“moveTs”:“28”},“withCompany”:{“groupId”:5,“predicate”:“withCompany”,“moveTs”:“29”},“withGps”:{“groupId”:5,“predicate”:“withGps”,“space”:“7782805485”},“withInterview”:{“groupId”:5,“predicate”:“withInterview”,“space”:“221288458”},“withJob”:{“groupId”:5,“predicate”:“withJob”,“space”:“10772862262”},“withWifi”:{“groupId”:5,“predicate”:“withWifi”,“space”:“4211920663”}},“snapshotTs”:“54489876”,“checksum”:“11427293922357654662”}},“zeros”:{“1”:{“id”:“1”,“addr”:“172.21.46.35:5080”,“leader”:true}},“maxLeaseId”:“15000000000000020000”,“maxTxnTs”:“55300000”,“maxRaftId”:“5”,“cid”:“dca06408-70ba-4f46-ae60-7df73f943dd9”,“license”:{“maxNodes”:“18446744073709551615”,“expiryTs”:“1596203542”,“enabled”:true}}