Commit bc23ba1
committed
fix(engine): don't attempt search when ETS checkpoint is loading
The checkpoint file can be quite large (1.2G in my case) and it may take
quite a while to load it (8.2s in my case). During that time, all the
GenServer calls with the default timeout of 5000ms might timeout,
leading to the whole GenServer termination and general instability of
the search functionality.
This adds guards for state.loaded? which return {:error, :loading} if
it's not loaded.1 parent 03ec5c6 commit bc23ba1
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
109 | 121 | | |
110 | 122 | | |
111 | 123 | | |
| |||
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
| |||
146 | 162 | | |
147 | 163 | | |
148 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
149 | 169 | | |
150 | 170 | | |
151 | 171 | | |
152 | 172 | | |
153 | 173 | | |
154 | 174 | | |
155 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
156 | 180 | | |
157 | 181 | | |
158 | 182 | | |
| |||
0 commit comments