Commit 1b1a884
authored
sdk: Fix empty-cache handling in LocalFileIdentifiableStore (#463)
Previously, the `_object_cache` of the `LocalFileIdentifiableStore` was
initialised empty. Calling `discard()` immediately after store
initialisation raised a `KeyError` if the Identifiable to delete existed
on disk but had not yet been loaded into the in-memory cache.
This adds explicit handling of missing cache entries in `discard()`,
preventing errors when a key is not present in the in-memory cache.
Moreover, a corresponding regression test is added. Finally, the interim
empty-cache workaround in `sync()` is removed.
Fixes #4381 parent 10ff4e4 commit 1b1a884
3 files changed
Lines changed: 11 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 81 | | |
96 | 82 | | |
97 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments