Skip to content

Commit

Permalink
Fix delta storage failing to merge node under rare circumstances (#1201)
Browse files Browse the repository at this point in the history
Only fails if a node that was created after exceeding 63 readers should be merged with a node that was created before exceeding 63 readers, resulting in an `GMP===int` comparison. Affected nodes were still merged on the next `::collect()` call -> solely internal change.
  • Loading branch information
Nevay authored Dec 28, 2023
1 parent 7c45db0 commit a196c13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SDK/Metrics/Stream/DeltaStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private function tryUnlink(Delta $n): void
$c = $c->prev) {
}

if ($c && $n->prev->readers === $c->readers) {
if ($c && $n->prev->readers == $c->readers) {
$this->mergeInto($c->metric, $n->prev->metric);
$n->prev = $n->prev->prev;
}
Expand Down

0 comments on commit a196c13

Please sign in to comment.