| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 168802886
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157446717
|
|
|
|
|
|
|
|
| |
The "concurrent" bit was supposedly around for testing purposes, but who knows if it even works anymore. Making other callsites explicitly state their ErrorClassifier gets us down to two constructors, one of which can delegate to the other.
I think having both these constructors is useful because there's a linkage between creating a new executor service and specifying that the AQV should shut down the service at the end of the visitation. And using a static create() method doesn't work because of AQV's inheritance model.
PiperOrigin-RevId: 155406771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a boring naive synchronized implementation.
There's a race condition in my design of the lockless data structure. I haven't been able to come up with a lockless algorithm that actually works, and the naive one seems to be fine. In Blaze's usage, performance actually isn't super important so the naive implementation is fine.
Consider three threads and a MultisetSemaphore with 2 max unique values.
T1: acquireAll({a, b})
T2: acquireAll({a, c})
T3: acquireAll({a, d})
For the for-loop before the 'acquire' call, suppose:
-T1 wins the race to acquire 'a' [1] and also wants to acquire 'b' [1]
-T2 loses the race to acquire 'a' [2] and also wants to acquire 'c' [1]
-T3 loses the race to acquire 'a' [2] and also wants to acquire 'd' [1]
So then in [3] we have:
-T1 tries to acquire 2 permits
-T2 tries to acquire 1 permit
-T3 tries to acquire 1 permit
Suppose the execution order in [3] is T2, T3, T1. So that means we then have T1 still at [3] and both T2 and T3 at [4], which is a deadlock.
[1] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L184
[2] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L191
[3] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L199
[4] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L210
--
PiperOrigin-RevId: 148272171
MOS_MIGRATED_REVID=148272171
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 145473478
MOS_MIGRATED_REVID=145473478
|
|
|
|
|
|
|
| |
at most K unique things at once.
--
MOS_MIGRATED_REVID=138684040
|
|
|
|
|
|
|
|
|
| |
places we wait for tasks (plural!) submitted to a ForkJoinPool to finish since we actually want to do so interruptibly.
As was to be expected, testing this was tricky :)
--
MOS_MIGRATED_REVID=134128019
|
|
|
|
|
|
|
| |
The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.
--
MOS_MIGRATED_REVID=130327770
|
|
|
|
|
|
|
|
|
| |
Make sure that ParallelEvaluator treats SchedulerExceptions as less severe than other RuntimeExceptions (it already did, but add a comment emphasizing this).
The combination of the above means that we don't ignore hypothetical crashes in ParallelEvaluator worker threads _after_ a SchedulerException (e.g. due to an error in nokeep_going evaluation).
--
MOS_MIGRATED_REVID=130044230
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128476121
|
|
|
|
|
|
|
| |
functionality was only used in tests.
--
MOS_MIGRATED_REVID=124841573
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=123347295
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Second in a sequence of CLs to deflake #simpleCounter. The condition,
commented out in a previous CL, was checking a property that wasn't
deterministic. The maxRunningConcurrently could be either one or two
depending on how quickly the AbstractQueueVisitor scheduled the
runnables.
Also added documentation to a confusing constructor call and removed
dead code.
--
MOS_MIGRATED_REVID=116995523
|
|
|
|
|
|
|
|
| |
First in a (probably short) sequence of commits to fix the flakiness
of the #simpleCounter test.
--
MOS_MIGRATED_REVID=116701149
|
|
|
|
|
|
|
| |
count and possibly use that value to make dynamic decisions around scheduling.
--
MOS_MIGRATED_REVID=116351222
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=109835697
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108983674
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Raises the level of abstraction of ValueVisitor's dependence on
AbstractQueueVisitor. Except for the "ForTestingOnly" methods now
available on the QuiescingExecutor interface, ValueVisitor is
agnostic to the implementation of its executor.
This also cleans up the full spectrum of visibility modifiers on
ValueVisitor methods, all of which ought to be private.
--
MOS_MIGRATED_REVID=106847453
|
|
|
|
|
|
|
|
|
|
| |
Changes the AbstractQueueVisitor strategy for varying its response to
unhandled exceptions from inheritance to composition. This will help
with a forthcoming switch from inheritance to delegation for
ValueVisitor's use of AbstractQueueVisitor.
--
MOS_MIGRATED_REVID=106730708
|
|
|
|
|
|
|
|
|
|
|
|
| |
This interface (mostly) encapsulates what the ValueVisitor expects
from the AbstractQueueVisitor class it currently inherits from. This
makes it easier for a future CL to change ValueVisitor's strategy of
code reuse from inheritance to composition.
RELNOTES:
--
MOS_MIGRATED_REVID=106728863
|
|
|
|
|
|
|
|
|
| |
order. In general, there's no advantage in Blaze to FIFO, and it means that we effectively do breadth-first graph traversal. When we must hold state for incomplete nodes (as we do with action execution, or more generally, as we do in Skyframe), this increases our memory footprint.
LIFO is not exactly depth-first traversal, since we are multithreaded, but to a first approximation, it looks like a depth-first traversal with "width" the number of threads (at each level of the graph, #(threads) nodes are visited).
--
MOS_MIGRATED_REVID=105995014
|
|
|
|
|
|
|
| |
RELNOTES: None
--
MOS_MIGRATED_REVID=105787681
|
|
|
|
|
|
|
| |
Previously, only ThreadPoolExecutor implementations were allowed.
--
MOS_MIGRATED_REVID=105340237
|
|
|
|
|
|
|
|
|
|
|
| |
The headers were modified with
`find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'`
And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan.
The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand.
--
MOS_MIGRATED_REVID=103938715
|
|
|
|
|
|
|
| |
the documentation for AQV#work to reflect the semantics of critical errors.
--
MOS_MIGRATED_REVID=103140100
|
|
|
|
|
|
|
| |
stores a striped set of reentrant locks.
--
MOS_MIGRATED_REVID=102198213
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100399962
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Ended up not being necessary; I was able to rephrase things using SettableFuture instead.
*** Original change description ***
Introduce a simple concurrent Multimap-like data structure with reference counting.
--
MOS_MIGRATED_REVID=96884190
|
|
|
|
|
|
|
| |
shutdown operations.
--
MOS_MIGRATED_REVID=96351438
|
|
|
|
|
|
|
| |
counting.
--
MOS_MIGRATED_REVID=96024804
|
|
|
|
|
|
|
| |
mistakenly submitted. Also fix a now-exposed bug in the testing code: one of the helpers wasn't threadsafe.
--
MOS_MIGRATED_REVID=96018858
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=90282858
|
|
|
|
|
|
|
|
|
|
|
| |
(i) Change the semantics of KeyedLocker.AutoUnlocker#close such that it can be called at most once per AutoUnlocker instance.
(ii) Change KeyedLocker.AutoUnlocker#close to throw a IllegalUnlockException (RuntimeException) on error, rather than leave the behavior intentionally underspecified.
(iii) explicitly mention in AutoLocker#lock that a thread can call lock(k) multiple times before unlocking. Combined with (i), this implies that KeyedLocker#lock implementations will want to return fresh AutoUnlocker instances.
These semantics are bit nicer to use anyway, but I also want them because I will soon be introducing KeyedLocker#lockBatch, and it's much easier to specify that given the above.
--
MOS_MIGRATED_REVID=90259645
|
|
|
|
|
|
|
| |
mutexes, and RefCountedMultisetKeyedLocker, an efficient implementation of this abstraction.
--
MOS_MIGRATED_REVID=88000985
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87942730
|
|
--
MOE_MIGRATED_REVID=85702957
|