Skip to content

refactor: use sync map instead for map string#549

Closed
nerdeveloper wants to merge 7 commits into
helm:mainfrom
nerdeveloper:fix/race-race-conditions-and-race-flag
Closed

refactor: use sync map instead for map string#549
nerdeveloper wants to merge 7 commits into
helm:mainfrom
nerdeveloper:fix/race-race-conditions-and-race-flag

Conversation

@nerdeveloper

Copy link
Copy Markdown
Member

Signed-off-by: nerdeveloper [email protected]

@jdolitsky

Copy link
Copy Markdown
Contributor

@nerdeveloper - can you add the -race flag to scripts/test to trigger the issue?

@nerdeveloper

Copy link
Copy Markdown
Member Author

Yes

@nerdeveloper

Copy link
Copy Markdown
Member Author

@nerdeveloper - can you add the -race flag to scripts/test to trigger the issue?

Done

Comment thread scripts/test.sh Outdated
@scbizu

scbizu commented Feb 10, 2022

Copy link
Copy Markdown
Contributor

@nerdeveloper And please fix your DCO verification ?

TimestampTolerance time.Duration
ExternalCacheStore cache.Store
InternalCacheStore map[string]*cacheEntry
InternalCacheStore sync.Map

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we wrap the sync.Map inside a specialized structure , for example type memoryCacheStore struct { sync.Map } maybe , and wrap the Load and Store func ? Doing a type assertion every where seems ugly though .

dependabot Bot and others added 7 commits February 10, 2022 07:26
helm#540)

Bumps [github.com/chartmuseum/storage](https://github.com/chartmuseum/storage) from 0.12.2 to 0.12.3.
- [Release notes](https://github.com/chartmuseum/storage/releases)
- [Commits](chartmuseum/storage@v0.12.2...v0.12.3)

---
updated-dependencies:
- dependency-name: github.com/chartmuseum/storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: nerdeveloper <[email protected]>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: nerdeveloper <[email protected]>
* fix: avoid panic with dynamic depth configured

Signed-off-by: Casey Buto <[email protected]>

* test: Add test for dynamic depth route

Signed-off-by: Casey Buto <[email protected]>
Signed-off-by: nerdeveloper <[email protected]>
Signed-off-by: nerdeveloper <[email protected]>
Co-authored-by: Casey Buto <[email protected]>
Signed-off-by: nerdeveloper <[email protected]>
@nerdeveloper
nerdeveloper force-pushed the fix/race-race-conditions-and-race-flag branch from 48a7463 to dc067d9 Compare February 10, 2022 03:27
@helm-bot helm-bot added size/L and removed size/S labels Feb 10, 2022
@cbuto

cbuto commented Feb 17, 2022

Copy link
Copy Markdown
Contributor

@nerdeveloper is there anything we can help with here?

@nerdeveloper

Copy link
Copy Markdown
Member Author

Yes, @cbuto, I tried to refactor to sync map, but the race condition still exists. i am having a hard time debugging this

@nerdeveloper

Copy link
Copy Markdown
Member Author

I am going to close this PR, as @cbuto has picked it and finished it

@nerdeveloper
nerdeveloper deleted the fix/race-race-conditions-and-race-flag branch March 14, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants