Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add expireAfterWrite tolerance to handle high write rates
Full details are described in [1]. In a JMH write benchmark, the write buffer was overwelmed and caused degredations. This only occurs for expireAfterWrite due to needing to reorder the entry on the O(1) queue after an update. Due to the high rate of updates and an unbounded buffer, the system would perform poorly. Similar behavior was only seen for maximumSize stress testing of inserts. In both cases a Thread.yield resolves the problem. This case is more likely to be seen by users benchmarking their apps, so it is unfair to not resolve it. An update within a short time window (1 second) is not reordered on the expireAfterWrite queue. This allows the async maintenance to keep up without a problem, while honoring the user's expectations. [1] orbit/orbit#144 (comment)
- Loading branch information