You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "georgew5656 (via GitHub)" <gi...@apache.org> on 2023/06/15 18:05:55 UTC
[GitHub] [druid] georgew5656 opened a new pull request, #14435: Don't need to double synchronize on simple map operations
georgew5656 opened a new pull request, #14435:
URL: https://github.com/apache/druid/pull/14435
### Description
We are using a lock around a concurrentHashMap for simple one line get/insert operations into the map which shouldn't be necessary since the hash map itself will guarantee atomic operations on itself.
There's some parts of the K8s task runner where we do multiple operations inside a lock on the tasks table (like when we update the item to include its lifecycle), that can be revisited as well, but for now I think we can remove the most redundant locks.
#### Release note
- remove unnecessary synchronization in K8s task runner.
This PR has:
- [X ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ X] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s merged pull request #14435: Don't need to double synchronize on simple map operations
Posted by "suneet-s (via GitHub)" <gi...@apache.org>.
suneet-s merged PR #14435:
URL: https://github.com/apache/druid/pull/14435
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] georgew5656 commented on pull request #14435: Don't need to double synchronize on simple map operations
Posted by "georgew5656 (via GitHub)" <gi...@apache.org>.
georgew5656 commented on PR #14435:
URL: https://github.com/apache/druid/pull/14435#issuecomment-1594696094
> Makes sense to me.
>
> After these changes, would there be any operation in this class that is still synchronized on `tasks`?
no, i don't believe so
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org