Commit Graph

1078 Commits

Author SHA1 Message Date
Tony Tung
a29ff60cec [fastmanifest] properly squelch output from worker processes
Summary: We don't want users to see scary exceptions or errors from worker processes.  They are unexpected and hard to deal with.

Test Plan: introduce syntax errors into the code.  run hg boo -d abc in repo with fastmanifest enabled.  saw no errors.  then ran the same command with --config=fastmanifest.silentworker=False and saw the error.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3357657

Signature: t1:3357657:1464365560:0cb101ab8a886f8e586a275bd91090331ad20982
2016-05-27 13:03:33 -07:00
Tony Tung
cf965d4d67 [fastmanifest] prefix debugging messages with [FM]
Summary: When --debug is turned on for commands, there's a ton of spew.  This makes it easier to spot the parts I care about.

Test Plan: update tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3357974

Signature: t1:3357974:1464365624:83edc815109db8533465991413a7c7741f1056a8
2016-05-27 12:41:56 -07:00
Tony Tung
5cfba408ea [fastmanifest] RFC: fastpath for manifest writing
Summary: This mostly replicates the logic in `manifest.py::manifest::add(..)`, except it interfaces with the fastmanifest cache instead.

Test Plan:
used `hg debugcachedmanifest` to populate the cache, then did a commit with `pdb.set_trace()`.

Future Test Plan:
# Write a Real Unit Test™
# Instrument revlog to ensure we're not actually reading from the revlog.

Reviewers: lcharignon, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mitrandir, mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D3337102

Tasks: 11294278

Signature: t1:3337102:1464087802:b1cd63fc6be820e713f176463bac372a8042f6e8
2016-05-27 12:41:40 -07:00
Mateusz Kwapich
f2654a8805 sqldirstate: extract method issqldirstate
Summary: I've done it wrong in one place so let's centralize that.

Test Plan: ran tests.

Reviewers: #mercurial, ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354724
2016-05-26 17:33:17 -07:00
Tony Tung
8699e2ba59 [fastmanifest] move remaining fastmanifest.py code to debug.py
Summary: `fixedcachelimit` is removed by D3355182 so the rest is just debug cruft.

Test Plan: pass existing unit tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3355456

Signature: t1:3355456:1464304289:07a16dec879f0caa3947fbc4fe5db353149d5209
2016-05-26 17:05:19 -07:00
Tony Tung
09d99415d3 [fastmanifest] move cache management code to cachemanager.py
Summary: yay modularization

Test Plan: pass unit tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3355420

Signature: t1:3355420:1464304331:718192fa25d5c6c7de0b18fb79c5f4fd3108ea88
2016-05-26 17:05:01 -07:00
Tony Tung
dd1a02c4cd [fastmanifest] move fork_worker to concurrency.py
Summary: I think it makes sense.

Test Plan: run unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3355211

Signature: t1:3355211:1464304354:fb04fcd1ed496da3a7f0a176c4bc04f4fc3711b3
2016-05-26 17:04:46 -07:00
Tony Tung
7503deb3a3 [fastmanifest] easily stealable locks
Summary: We want to wrap the fastmanifest cache priming code in a lock, but we want it to be easily stealable.  If the lock is more than X seconds in age, we just assume it's stale and steal it.  We remember that we stole it so we don't blow away the lock, but we do update the time of the lock so another process doesn't try to steal the lock.

Test Plan: write test to cover basic functionality (mutual exclusivity).  write test to cover stealing, and that only one thief is permitted at a time (subject to race conditions).

Reviewers: durham, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D3343478

Tasks: 11385124

Signature: t1:3343478:1464304447:18658ebea60f98bfda0f034414991ffd6c334ca7
2016-05-26 17:04:23 -07:00
Tony Tung
7e1de826f1 [fastmanifest] hybridmanifest needs to implement filesnotin
Summary: If we default the proxy to flatmanifest's or fastmanifest's implementation of `filesnotin`, we can end up in situations where we're dealing with different types of manifests.

Test Plan: hg amend works w/ fastmanifest

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354668

Signature: t1:3354668:1464304470:6a7097a15043d4639111a5243c702569bc5fe004
2016-05-26 17:03:56 -07:00
Tony Tung
3f68523569 [fastmanifest] remove manifestfactory since it's in implementation.py
Summary: Oops, #fail on my part.

Test Plan: passed unit tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354484

Signature: t1:3354484:1464304484:1de4a444e30de34ce7c88f5f25416bf64a2c11bb
2016-05-26 17:03:07 -07:00
Tony Tung
5bd4a7d91e [fastmanifest] remove fastmanifest.py
Summary: Oops, this should have gone away.

Test Plan: meh

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354462

Signature: t1:3354462:1464304491:c36f430c759a57330e9b3c3b17ac093140475c02
2016-05-26 17:00:58 -07:00
Tony Tung
0493e8a94d [fastmanifest] remove code that's not yet been reviewed
Summary: Oops, my bad.

Test Plan: also it's not been tested yet.  lol.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354442

Signature: t1:3354442:1464304506:9b2e91e513d18933bfded7ac7ad082e6e22f3451
2016-05-26 17:00:01 -07:00
Laurent Charignon
f504ef4a25 fastmanifest: refactor systemawarecachelimit config parsing
Summary:
This makes the code smaller, more readable and prints a warning when
the config is malformed.

Test Plan: Test pass and tests exercise this code path.

Reviewers: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354470
2016-05-26 16:06:31 -07:00
Mateusz Kwapich
ba87b23e2d sqldirstate: test for interaction with shelve
Summary:
This test is mostly a copy of test-shelve.t from mercurial with
minor changes (removing the hooks usage).

The normal tests for shelve unfortunately are using out of proces
hooks which doesn't work good with sqldirstate. As shelve is
important extension for us we want to test is with shelve anyway.

Test Plan:
test passes on clowncopter with this patch applied:
http://patchwork.serpentine.com/patch/15207/

Reviewers: #mercurial, wez, quark, durham

Reviewed By: durham

Subscribers: quark

Differential Revision: https://phabricator.intern.facebook.com/D3350194

Signature: t1:3350194:1464260281:c85a1d5ae50d9488a8bcdb552343f466bebb9e05
2016-05-26 13:21:52 -07:00
Tony Tung
8b218c9e72 [fastmanifest] split fastmanifest.py into separate files
Summary: This combines D3351047, D3351086, and D3351137 into one diff.  This allows mercurial to better remember where things came from since these are all hg cp commands followed by some edits.  However, they were separated into multiple diffs for ease of reviews.

Test Plan: run unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3354405

Signature: t1:3354405:1464291057:da140a02b9c87186b1dd9f03f8236d5996319fff
2016-05-26 12:34:38 -07:00
Laurent Charignon
e0ba9e486e fastmanifest: refactor fastmanifesttocache
Summary:
fastmanifesttocache was getting a little messy so we break down the
function.

Test Plan: No test output change.

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3353446
2016-05-26 11:39:31 -07:00
Laurent Charignon
c7871dc0e2 fastmanifest: document fastmanifesttocache revset
Summary: This is a documentation change to make the code clearer

Test Plan: No test change

Reviewers: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3353435
2016-05-26 11:39:31 -07:00
Laurent Charignon
bfb8a8692b fastmanifest: rename a variable to make its role clearer
Summary: mannodes wasn't a descriptive name, revstomannodes is better

Test Plan: test output does not change as expected

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3353411
2016-05-26 11:39:31 -07:00
Laurent Charignon
2f1d1d661d fastmanifest: fix non-determinism in remotenames test
Summary:
Before this patch, we were caching in the background in remotenames
test. This could result in a race condition making the test non deterministic.

Test Plan: Test changed

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3353406
2016-05-26 11:39:31 -07:00
Laurent Charignon
48ba37066c fastmanifest: kill config fastmanifest.cacheonchangesystemlimit
Summary:
As discussed it is not relevant as the tests cache so little it should
not make the test non-deterministic.

Test Plan: The test change accordingly since the limit is no longer None

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3353394
2016-05-26 11:39:31 -07:00
Tony Tung
e62d8fd12b [fastmanifes] rename fastmanifest_wrapper as cfastmanifest
Summary: Depends on D3351021

Test Plan: run unit tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3351039

Signature: t1:3351039:1464284522:d63f5011c6ca1981408519f5f7378e9a33aaecfe
2016-05-26 11:34:56 -07:00
Tony Tung
fc8c0d61a1 [fastmanifest] rename fastmanifest c library directory to cfastmanifest
Summary: This allows us to use fastmanifest as a directory to drop in the python module.

Test Plan: compiles, passes existing tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3351021

Signature: t1:3351021:1464284417:6cbcde514ab1fd7b5caa6c83cb5577f3502dbc58
2016-05-26 11:33:07 -07:00
Laurent Charignon
ef5d7b06e3 fastmanifest: improve remotenames handling
Summary:
Before this patch, we didn't test that caching could be triggered by
remotename changes. When I tried testing it, I noticed that it wasn't working
because manifest for revisions with remotenames were not cached. I added
remote/master as a revision to cache to the fastmanifesttocache revset and
included a test.

Test Plan: Added a new test

Reviewers: simonfar, quark, ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3335931
2016-05-26 10:12:53 -07:00
Laurent Charignon
f8bf03c8a5 fastmanifest: only cache revisions from the last 60 days
Summary: This will limit what we cache in the first place

Test Plan:
No test yet, I will add a test in a diff later checking cache
eviction.

Reviewers: ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3346515
2016-05-26 10:05:12 -07:00
Laurent Charignon
1625c48a25 fastmanifest: document all the config options and default values
Summary:
This diff adds documentation for all the config options and their
default values.

Test Plan: No test change.

Reviewers: ttung, durham

Differential Revision: https://phabricator.intern.facebook.com/D3346491
2016-05-26 09:56:28 -07:00
Laurent Charignon
49185d4bb2 fastmanifest: shuffle by batches
Summary:
As discussed in the group, we want to shuffle by batches to keep
an approximate ordering and still avoid caching process fighting for the
same entries.

Test Plan: Add a new test

Reviewers: durham, ttung

Differential Revision: https://phabricator.intern.facebook.com/D3344144
2016-05-26 09:52:55 -07:00
Laurent Charignon
081100306c fastmanifest: cache in decreasing rev order and stop early if the cache is full
Summary:
If we want to cache revision [300, 350, 320, 380], we would first order the
revisions to be [380, 350, 320, 300] and cache them in that order. Assuming that
only 3 revisions can fit in the cache, we write all revisions and prune the
one that overflew. Afterwards, we change the mtime of all the cached entries
to ensure that for each of the newly cached entries, more recent mtime == more
relevant entry.

Test Plan: Test output changes slightly, as expected

Reviewers: mitrandir, ttung, simonfar

Differential Revision: https://phabricator.intern.facebook.com/D3344125
2016-05-26 09:53:10 -07:00
Laurent Charignon
3b42a42968 fastmanifest: refactor cache pruning logic
Summary: This will be useful to implement the new cache filling strategy.

Test Plan: Refactoring does not change test output (y)

Reviewers: ttung, simonfar, mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D3344111
2016-05-25 14:54:01 -07:00
Laurent Charignon
32134ad00e fastmanifest: add a method to change the mtime of a cache entry
Summary:
This will be useful later on and exercised by the new cache filling
strategy

Test Plan: Not exercised yet

Reviewers: mitrandir, ttung

Differential Revision: https://phabricator.intern.facebook.com/D3344107
2016-05-25 14:54:01 -07:00
Mateusz Kwapich
f932684619 sqldirstate: make shelve work with sqldirstate
Summary:
shelve is woking thanks to the hack where it abandons the transaction but
preserves the dirstate anyway by copying the dirstate to the side and restoring
it. We can do something that works as well and is way faster.

Test Plan:
ran tests
tried it on fbsource - it was nice and fast

Reviewers: #mercurial, ttung, simonfar, durham

Reviewed By: durham

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3345280

Signature: t1:3345280:1464170069:cfb22b7034f8a8c44fd4284cd35ba17e85dabb99
2016-05-25 14:12:09 -07:00
Mateusz Kwapich
8510d18a0c sqldirstate: just close connection on invalidate
Summary:
the transaction won't be commited anyway.
The journal will be rolled back on next database open.

Test Plan: ran mercurial tests with sqldirstate

Reviewers: #mercurial, durham, ttung, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3345277

Signature: t1:3345277:1464168844:69206055d24ae0349985f0038845122e7cea0a19
2016-05-25 14:12:09 -07:00
Mateusz Kwapich
abffbab274 sqldirstate: do not recreate dirstate object on the file change
Summary:
In the dirstate world we don't maintain in-memory cache over dirstate - there
is no need to invalidate it then.

Test Plan: ran mercurial tests with sqldirstate

Reviewers: #mercurial, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3345268

Signature: t1:3345268:1464169114:e55b709c4acbc89c4e2239f7534c6e13ef9b4861
2016-05-25 14:12:09 -07:00
Mateusz Kwapich
2bc5373ec4 sqldirstate: use the better interface to show supported requirements
Summary: I discovered that mercurial has better mechanics for extensions to use

Test Plan: ran mercurial tests with sqldirstate

Reviewers: #mercurial, durham, ttung, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3345260

Signature: t1:3345260:1464168562:32b09a0f86bc19b8622f8fe51ecb727ef3c44bbc
2016-05-25 14:12:09 -07:00
Mateusz Kwapich
7796b766b1 sqldirstate: disable tests using hooks
Summary: also remove some tests that are passing now from the list

Test Plan: ran mercurial tests with sqldirstate

Reviewers: #mercurial, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3345259

Signature: t1:3345259:1464168975:1f6e26ce730b32e5b0542ab3ef7e1dc7088c0b66
2016-05-25 14:12:09 -07:00
Mateusz Kwapich
02410993ca sqldirstate: do not execute insert if metadata already exists
Summary:
This causes the read-only dirstate operations to be readonly from
db standpoint so they can run while there is a pending transaction.

Test Plan: ran mercurial tests with sqldirstate

Reviewers: simonfar, durham

Reviewed By: simonfar, durham

Subscribers: simonfar, mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D3345257

Signature: t1:3345257:1464168444:a98bc04c23e174d0c10ed07eb914930949a67b7d
2016-05-25 14:12:09 -07:00
Tony Tung
1cdfa5921b [fastmanifest] delay revset evaluation until we're in the worker process
Summary: Interpret revrange inside the worker process. The reason this is needed is that `triggercacheondirstatechange` happens in the wlock release callback. However, the lock is not released at this point. Interpreting the revrange requires wlock, so then we try to acquire it but we'll never succeed (because we need to finish the wlock release callback). If we do it in the scope of the worker process, it'll try to acquire it, find that the primary process owns it, and wait to acquire it.

Test Plan: run unit tests

Reviewers: durham, lcharignon

Reviewed By: lcharignon

Subscribers: quark, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3339805

Tasks: 11385141

Signature: t1:3339805:1464209208:ec2424f84570d489aa5c0c629a15b69b6b126c60
2016-05-25 13:58:57 -07:00
Tony Tung
b5e5af62d4 [fastmanifest] fix indentation of test-fastmanifest.py
Summary: 4 space indents

Test Plan: still passes

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3343502

Signature: t1:3343502:1464134904:276c5de5ad70c22ac523725335f23668666d09b7
2016-05-25 13:23:19 -07:00
Laurent Charignon
3f946e992e fastmanifest: also cache parent of revisions
Summary:
This diff changes the fastmanifestocache revset to also cache parents
of revisions in the revset.

Test Plan: Check that it works calling debugcachemanifest manually with
hg sl -r "fastmanifesttocache()"

Reviewers: durham, ttung

Differential Revision: https://phabricator.intern.facebook.com/D3344222
2016-05-24 16:49:09 -07:00
Laurent Charignon
400252152d fastmanifest: refactor total size computation
Summary:
This will be useful to improve the cache filling process to stop once the limit
hits the total size.

Test Plan: Test output does not change

Reviewers: mitrandir, ttung, simonfar

Differential Revision: https://phabricator.intern.facebook.com/D3344099
2016-05-25 06:47:55 -07:00
Laurent Charignon
6c8c7ebe37 fastmanifest: add number of valid entries in the cache when displaying list
Summary: This could be useful to have the number of valid entries in the cache

Test Plan: Test output changes accordingly

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3343488
2016-05-24 15:33:26 -07:00
Laurent Charignon
17fa2557a1 fastmanifest: fix another typo in systemawarecachelimit
Summary:
This time I tested the full workflow filling up the cache entierly respecting
the system limit. It went well with no crash.

Test Plan:
Tested filling up the cache using the systemawarecachelimit and then
pruning some of the cache to exercise all the codepaths in systemawarecachelimit.

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3343474
2016-05-24 15:32:02 -07:00
Laurent Charignon
2cd4c37288 fastmanifest: make cacheonchange work in the background + respect system limit
Summary:
Before this patch with fastmanifest.cacheonchange on, we would cache
manifest on change to dirstate, bookmarks and remotenames. This patch makes
these operation in the background by default. Also it changes the cache strategy
used by default to be the new strategy that adapts based on the system resources.

Test Plan: Tests does not change

Reviewers: ttung, simonfar, quark

Differential Revision: https://phabricator.intern.facebook.com/D3341681
2016-05-24 12:38:42 -07:00
Laurent Charignon
464e56da29 fastmanifest: fix a typo in systemawarecachelimit
Summary: Wrong variable name lead to a crash

Test Plan: The crash does not happen anymore

Reviewers: ttung, simonfar, quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3341687
2016-05-24 12:38:42 -07:00
Laurent Charignon
17c6ef5c6d fastmanifest: actually fix non-deterministic tests
Summary:
I didn't fix the non determinism properly before, this patch fixes
the issue with a more defensive code.

Test Plan: Ran the test 32 times and the result didn't vary

Reviewers: ttung, simonfar, quark

Differential Revision: https://phabricator.intern.facebook.com/D3341032
2016-05-24 12:40:43 -07:00
Tony Tung
79ce923f96 [fastmanifest] daemonize → worker_process
Summary: We don't actually want to daemonize the process.  We just want to spawn a worker process to do some work.  Instead of exitting the initial process, we fork, do a bit of cleanup of the output streams, and then fork once again to prevent zombies.

Test Plan: run unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3339788

Tasks: 11385109, 11385154

Signature: t1:3339788:1464107186:95bdaeb1f612ab058c4cc004af70c4d0bd9d2c58
2016-05-24 11:25:51 -07:00
Tony Tung
f81b563361 [fastmanifest] materialize the revset immediately after evaluating
Summary: If we don't, then a lazily-evaluated set is returned.  That lazily-evaluated set will suppress the hidden bit when dirstate changes are involved.

Test Plan: on a dirstate change with a lot of hidden revs, observe that only a small set of revs are cached.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D3338252

Signature: t1:3338252:1464107195:fd0e342fb4e4eb485057b7fda9679f7ff18f4e7b
2016-05-24 11:25:12 -07:00
Tony Tung
b27e54bdbe [fastmanifest] don't daemonize pruneall
Summary: Shouldn't be slow enough to worth daemonizing.

Test Plan: visual

Reviewers: lcharignon

Subscribers: mitrandir, mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D3338182
2016-05-24 11:22:17 -07:00
Laurent Charignon
e84d5b370e fastmanifest: iterate by filename instead of os.listdir order
Summary:
Before this patch, we were iterating over the cache entries in a non-
deterministic fashion. This patch makes the iteration stable by ordering the
entries by filename.

Test Plan: Changed the tests accordingly

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3336880
2016-05-23 14:57:38 -07:00
Laurent Charignon
ee782fcb95 fastmanifest: make prune order deterministic
Summary:
We order by mtime and then by filename and not just by mtime. Otherwise, we
wrongfully relied on os.listdir to return the same thing on different platforms.

Test Plan: Change the test

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3336874
2016-05-23 14:56:21 -07:00
Laurent Charignon
ee182ba12b fastmanifest: add support for random ordering of cached revisions
Summary:
When we start worker process to cache revisions, since we don't use
a lock, it is better to have the workers cache revisions in a random order to
avoid duplicated effort as much as possible.

Test Plan: No test for now, not sure how to test that.

Reviewers: simonfar, quark, ttung

Differential Revision: https://phabricator.intern.facebook.com/D3335918
2016-05-23 14:32:46 -07:00