forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2185: Don't require connection to DB in token cache if not required r=popzxc a=popzxc I tried several approaches to integrate the functionality into the existing methods, but they failed for various reasons (for most: futures must be `Send`, and some methods are not async), so I solved it by adding a `try` version of the method. Should be fine given that most of requests are expected to be served by cache. This required a bit of copy-paste here and there, but I don't see as a root problem. The root problem: why the heck do we need *that many* implementations of getting token? 2186: Run database threads in a single thread r=popzxc a=popzxc I assume that since we run many transactions (often -- the same ones in different tests) in parallel, it sometimes causes dead locks. Tests are pretty fast, so running them in 1 thread is not a big deal (700ms vs 2700ms on my machine). More time is spent on compiling stuff. I also added the `--lib` flag to the command, so for db tests doc-tests are not ran (they are ran during the general unit-tests run though) -- surprisingly, even if there are no doc-tests, it takes couple of seconds for cargo to check that there are no tests to run. Co-authored-by: Igor Aleksanov <[email protected]>
- Loading branch information
Showing
6 changed files
with
94 additions
and
13 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
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
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
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
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
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