Commit 5e7ff9a
Fix flaky test - EvictToNvmGet
Summary:
This test was flaky because sometimes a nvm put could be aborted due to an outstanding tombstone for the same key. This can happen because the test is inserting items very quickly and thus evicting quickly. The following scenario can happen:
1. insert "key1" and queue a remove operation for "key1" to NvmCache (via insertOrReplace)
2. insert "key2" ... "key100"
3. triggers eviction of "key1" while a remove tombstone is outstanding for "key1". This NvmCache put is thus aborted.
The fix is to flush nvm-cache periodically to avoid such a race condition.
Reviewed By: jaesoo-fb
Differential Revision: D42443647
fbshipit-source-id: 56508b88b260b5a8fbe41b6d8dd5444e8f2c171f1 parent f0f80c0 commit 5e7ff9a
1 file changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
169 | 176 | | |
170 | 177 | | |
171 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
172 | 190 | | |
173 | 191 | | |
174 | 192 | | |
| |||
184 | 202 | | |
185 | 203 | | |
186 | 204 | | |
187 | | - | |
| 205 | + | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
| |||
0 commit comments