0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot - A scale-out production-ready vendor-neutral OCI-native container image/artifact registry (purely based on OCI Distribution Specification)
Find a file
peusebiu 7642e5af98
fix(scheduler): fix data race (#2085)
* fix(scheduler): data race when pushing new tasks

the problem here is that scheduler can be closed in two ways:
- canceling the context given as argument to scheduler.RunScheduler()
- running scheduler.Shutdown()

because of this shutdown can trigger a data race between calling scheduler.inShutdown()
and actually pushing tasks into the pool workers

solved that by keeping a quit channel and listening on both quit channel and ctx.Done()
and closing the worker chan and scheduler afterwards.

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>

* refactor(scheduler): refactor into a single shutdown

before this we could stop scheduler either by closing the context
provided to RunScheduler(ctx) or by running Shutdown().

simplify things by getting rid of the external context in RunScheduler().
keep an internal context in the scheduler itself and pass it down to all tasks.

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>

---------

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-12-11 10:00:34 -08:00
.github refactor(test): add lint rule for messages starting with the component (#2045) 2023-12-08 10:05:02 +02:00
.zap feat(zui): update to zui supporting social login (#1639) 2023-07-21 12:50:41 -07:00
build ci: move distroless to debian12 (#2056) 2023-11-21 14:54:07 +02:00
cmd refactor(pkg/test): split logic in pkg/test/common.go into multiple packages (#1861) 2023-09-27 11:34:48 -07:00
demos oras fix: 2022-08-30 21:39:16 +03:00
docs swagger: rename 'docs/' to 'swagger/' 2021-10-21 13:46:14 -07:00
errors refactor(test): add lint rule for messages starting with the component (#2045) 2023-12-08 10:05:02 +02:00
examples Sync s3 (#2073) 2023-11-28 12:08:15 -08:00
pkg fix(scheduler): fix data race (#2085) 2023-12-11 10:00:34 -08:00
scripts refactor(test): add lint rule for messages starting with the component (#2045) 2023-12-08 10:05:02 +02:00
swagger feat(cli): add command to interogate the server version and other details (#1709) 2023-11-22 19:25:21 +02:00
test fix(scheduler): fix data race (#2085) 2023-12-11 10:00:34 -08:00
.gitignore refactor(metadb): improve UX by speeding up metadb serialize/deserialize (#1842) 2023-10-30 13:06:04 -07:00
CODE_OF_CONDUCT.md doc: add a CODE_OF_CONDUCT.md 2020-12-15 11:20:45 -08:00
codecov.yml refactor(metadb): improve UX by speeding up metadb serialize/deserialize (#1842) 2023-10-30 13:06:04 -07:00
CODEOWNERS add a CODEOWNERS file 2022-05-04 11:52:28 -07:00
COMPARISON.md move references to zotregistry.io and project-zot 2021-12-05 10:52:27 -08:00
CONTRIBUTING.md build: fix container image targets (#1856) 2023-10-04 09:12:56 -07:00
go.mod chore: fix dependabot alerts (#2113) 2023-12-04 11:28:01 -08:00
go.sum chore: fix dependabot alerts (#2113) 2023-12-04 11:28:01 -08:00
golangcilint.yaml ci: update golangci-lint version (#1834) 2023-10-20 17:27:04 +03:00
LICENSE docs: fix copyright related info for cncf onboarding (#1117) 2023-01-17 15:43:45 -08:00
MAINTAINERS.md docs: fix CNCF related documentation (#1099) 2023-01-10 15:52:11 -08:00
Makefile fix(scheduler): fix data race (#2085) 2023-12-11 10:00:34 -08:00
NOTICE docs: fix copyright related info for cncf onboarding (#1117) 2023-01-17 15:43:45 -08:00
README.md fix: reduce test run time (#1832) 2023-09-28 21:59:52 +03:00
README_fuzz.md Add fuzz tests for storage_fs (#601) 2022-07-27 20:37:55 +03:00
SECURITY.md chore: fix security alerts (#1493) 2023-06-01 16:53:50 -07:00
THIRD-PARTY-LICENSES.md chore: fix dependabot alerts (#2113) 2023-12-04 11:28:01 -08:00
tools.go chore(trivy): update trivy version and enforce OCI compliant repo names in local image storage (#1068) 2023-01-18 08:24:44 -08:00
zot.go zot: initial commit 2019-06-21 15:29:19 -07:00

zot build test nightly jobs codecov.io Conformance Results CodeQL CII Best Practices Go Reference

zot: a production-ready vendor-neutral OCI image registry - images stored in OCI image format, distribution specification on-the-wire, that's it!

Docs

Documentation for zot is located at: https://zotregistry.io

Code of Conduct

Details are in the code of conduct