Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Sep 5, 2022
1 parent aca6609 commit 9d02ffb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion ddl/lightning/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ go_library(

go_test(
name = "lightning_test",
srcs = ["mem_root_test.go"],
srcs = [
"env_test.go",
"mem_root_test.go",
],
flaky = True,
deps = [
":lightning",
"//config",
"@com_github_stretchr_testify//require",
],
)
3 changes: 0 additions & 3 deletions ddl/lightning/engine_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ func (m *engineManager) Register(bc *BackendContext, job *model.Job, indexID int
id := openedEn.GetEngineUUID()
en = NewEngineInfo(bc.ctx, job.ID, indexID, cfg, openedEn, id, 1, m.MemRoot, m.DiskRoot)
m.Store(indexID, en)
if err != nil {
return errors.New(LitErrCreateEngineFail)
}
m.MemRoot.Consume(StructSizeEngineInfo)
m.MemRoot.ConsumeWithTag(encodeEngineTag(job.ID, indexID), engineCacheSize)
} else {
Expand Down
3 changes: 3 additions & 0 deletions ddl/lightning/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,8 @@ func genLightningDataDir() (string, error) {
return sortPath, nil
}

// GenRLimitForTest is only used for test.
var GenRLimitForTest = genRLimit

// GenLightningDataDirForTest is only used for test.
var GenLightningDataDirForTest = genLightningDataDir

0 comments on commit 9d02ffb

Please sign in to comment.