PakhomovAlexander commented on code in PR #3186:
URL: https://github.com/apache/ignite-3/pull/3186#discussion_r1484155853
##########
modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/QueueExecutionImpl.java:
##########
@@ -46,6 +48,8 @@ class QueueExecutionImpl<R> implements QueueExecution<R> {
private final CompletableFuture<R> result = new CompletableFuture<>();
+ private final Lock changePriorityLock = new ReentrantLock();
Review Comment:
Using the lock is a good idea. But I think we can expand the lock to every
place read/write to/from queue. In this case we can user ReadWriteLock and get
rid of volatile both in `queueEntry` and `priority`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]