querysub 0.485.0 → 0.486.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -182,7 +182,9 @@ class ValidStateComputer {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
authorityStorage.ingestValues(notOurValues, { doNotArchive });
|
|
185
|
-
authorityStorage.
|
|
185
|
+
let newOurValues = ourValues.filter(x => !authorityStorage.getValueExactMaybeRejected(x.path, x.time));
|
|
186
|
+
// Only ingest the values that are new to us. Otherwise, we'd be accepting the valid state from somebody else, and we're the authority, so we just shouldn't do that.
|
|
187
|
+
authorityStorage.ingestValues(newOurValues, { doNotArchive });
|
|
186
188
|
|
|
187
189
|
|
|
188
190
|
let loopCount = 0;
|
|
@@ -419,11 +421,11 @@ class ValidStateComputer {
|
|
|
419
421
|
}
|
|
420
422
|
*/
|
|
421
423
|
// IMPORTANT! This means if it didn't previously exist and it's presently rejected, we count that as a change, as it this is going from undefined to false. This is actually very useful, as a lot of places want to know if a write is rejected, so they can display it in the UI for the developer.
|
|
422
|
-
if (valid === prevValidState) continue;
|
|
424
|
+
if (valid === prevValidState && pathValue.valid === valid) continue;
|
|
423
425
|
|
|
424
426
|
// NOTE: We might remove this logging later as it's pretty heavy, but right now we still have bugs somewhere here.
|
|
425
427
|
{
|
|
426
|
-
console.info(`Changed valid state ${JSON.stringify(prevValidState)} to ${JSON.stringify(valid)}`, {
|
|
428
|
+
console.info(`Changed valid state ${JSON.stringify(prevValidState)} to ${JSON.stringify(valid)} (and path is ${JSON.stringify(pathValue.valid)})`, {
|
|
427
429
|
path: pathValue.path,
|
|
428
430
|
timeId: pathValue.time.time,
|
|
429
431
|
timeIdFull: pathValue.time,
|