Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed Dec 27, 2024
1 parent fa27128 commit 723c3fb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/programs/data/shared-log/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2897,7 +2897,6 @@ export class SharedLog<
properties.prev &&
properties.prev.assignedToRangeBoundary === assignedToRangeBoundary
) {
console.log("SKIP", properties.entry.hash, properties.coordinates);
return; // no change
}

Expand Down Expand Up @@ -3258,7 +3257,7 @@ export class SharedLog<
replicas: minReplicas.getValue(this),
})
) {
console.error("Is leader after delete");
logger.error("Unexpected: Is leader after delete");
}
});
}, this.waitForPruneDelay),
Expand Down
7 changes: 3 additions & 4 deletions packages/programs/data/shared-log/src/sync/rateless-iblt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,14 @@ export class RatelessIBLTSynchronizer implements Syncronizer<"u64"> {

messageQueue.push(newMessage);
messageQueue.sort((a, b) => Number(a.seqNo - b.seqNo));
if (messageQueue[0].seqNo != lastSeqNo + 1n) {
console.log("WAITING SEQ", messageQueue[0].seqNo, lastSeqNo + 1n);
return undefined;
if (messageQueue[0].seqNo !== lastSeqNo + 1n) {
return;
}
lastSeqNo++;

const message = messageQueue.shift();
if (!message) {
return undefined;
return;
}

for (const symbol of message.symbols) {
Expand Down
1 change: 0 additions & 1 deletion packages/programs/data/shared-log/src/sync/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export class SimpleSyncronizer<R extends "u32" | "u64">
// cleanup "old" missing syncs
for (const [hash, { timestamp }] of map) {
if (timestamp < nowMin10s) {
console.log("DELETE HASH", hash);
map.delete(hash);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/programs/data/shared-log/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export const checkReplicas = async (
dbs.map(
(x) =>
[...(x.log._gidPeersHistory.get(gid) || [])].filter(
(id) => id != x.log.node.identity.publicKey.hashcode(),
(id) => id !== x.log.node.identity.publicKey.hashcode(),
).length || 0,
) +
". Has? " +
Expand Down

0 comments on commit 723c3fb

Please sign in to comment.