forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the flaky async cache tests (facebookincubator#10141)
Summary: The flakiness is due to that currently we don't handle the concurrent cache loads with cache shutdown. We rely on the query system to handle these concurrency properly like stop accessing query cache access, and then shutdown the cache. This is not the case for async cache tests which might schedule coalesced cache loads to a background executor, and might start the next round of tests without waiting for the previous background activities to finishes. Each test round like in ssdWriteOptions will reset the cache which shutdown the cache. This cause the background coalesced cache load see freed cache entries. This change fixes the flakines by adding a pending batch load counter and wait for it to complete before starts the next round of test. Note we have no plan to handle the async cache shutdown race with concurrent query cache access. It might need a lock which is pretty expensive as in-memory cache access is high frequent operation and we would rather relying on the query system to prevent this. Pull Request resolved: facebookincubator#10141 Reviewed By: zacw7 Differential Revision: D58432597 Pulled By: xiaoxmeng fbshipit-source-id: 0bc811a7781de637a446f286d9a8541eaa9dd82b
- Loading branch information
1 parent
9edecbb
commit 9434bba
Showing
1 changed file
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters