From cf1e7dce8a15f7de90eebad4cf3001fda00d9d5d Mon Sep 17 00:00:00 2001 From: Tracy Rust Date: Tue, 2 Apr 2024 13:24:57 -0400 Subject: [PATCH] Comments --- src/writerecord.js | 2 ++ src/writerecord.test.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/writerecord.js b/src/writerecord.js index 5585e2b..267749e 100644 --- a/src/writerecord.js +++ b/src/writerecord.js @@ -290,6 +290,8 @@ function pickTopPropertyRecord(property) { //equal timestamps //Use machine id as tie-breaker + //These essentially have to be different, otherwise we would only have one record + // (because records with the same machine Id are digested into the same property) return predictableStringComparison(a.machineId, b.machineId); } diff --git a/src/writerecord.test.js b/src/writerecord.test.js index 090d816..9332440 100644 --- a/src/writerecord.test.js +++ b/src/writerecord.test.js @@ -663,3 +663,6 @@ describe("records anchored to each other", () => { expect(readPropertyValue(prop)).toBe(42); }); }); + + +//Record anchored to itself? again "should never happen" but what do we do if it does? \ No newline at end of file