Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
feat: MLIBZ-2563 Add updating query cache item if it exists instead of creating new #179
When a deltaset specific error occurs, deltaset request is not retried on next attempts to pull/sync
Expected result: The first pull makes a regular GET and enter a value in the _QueryCache table, the next one attempts _deltaset request, but it fails for an error, so a regular GET is again made and its value overrides the lastRequestAt value in the _QueryCache table. The third request does exactly the same as the second one
Actual result: The first pull does what is expected, the second uses deltaset and then regular GET, but records a new entry for the query in _QueryCache table, so now it has 2 entries. The third pull directly makes a regular GET instead of first using deltaset. These also make their own entries on the _QueryCache, so after a few pulls, there are a few entries with the same query but with different lastRunAt values.
Added updating the query cache item if it exists instead of creating new.
@@ Coverage Diff @@ ## indev #179 +/- ## ========================================= Coverage 58.13% 58.13% Complexity 473 473 ========================================= Files 41 41 Lines 3134 3134 Branches 479 479 ========================================= Hits 1822 1822 Misses 1163 1163 Partials 149 149
vinaygahlawat left a comment
In the scenario where a deltaset-specific error occurs, the first action that should happen is that the corresponding
In the previous implementation, the QueryCacheItem isn't updated in some cases, so if user has done a lot of