docs(grpc-data): lapsed-lease behaviour; H3 gate drops the re-browse workaround and idles past the lease (#922)

This commit is contained in:
Joseph Doherty
2026-11-28 09:45:04 -05:00
parent 092f62d3bc
commit 7f071955ba
2 changed files with 32 additions and 6 deletions
+8 -6
View File
@@ -24,6 +24,8 @@ NODE_PERMISSIONS_ADMIN = 4095 # NodePermissions.Admin = bits 0..11 (HistoryUpda
NODE_PERMISSIONS_HISTORY_READ = 1 << 3
NODE_PERMISSIONS_BROWSE = 1 << 0
EXPORT_WITHOUT_HISTORY = 31 # Browse | Metadata | Read | Write | Subscribe
# #922: longer than the rig mappings' 15 s MetadataLeaseMilliseconds, so a projected node idles past its lease.
LEASE_LAPSE_SECONDS = 20
def _iso(moment):
@@ -266,9 +268,8 @@ class HistoryGate:
with self.runner.stopped(source):
observed["new_primary"] = self.runner.wait_primary("source", exclude=source)
self.runner.wait_connection_ready(consumer, "raw")
# Resume INSIDE the stop window: the issuing endpoint is down, the pinned resume cannot move. Re-browse first so
# the node's projection authority is current (it lapses with the 15 s metadata lease, as for a value Read).
self.rebrowse()
# Resume INSIDE the stop window: the issuing endpoint is down, the pinned resume cannot move. No re-browse: a
# projected node whose 15 s metadata lease lapsed renews on demand within the HistoryRead (#922).
self.held_resume_now()
self.runner.wait_pair_topology("source")
@@ -374,10 +375,11 @@ class HistoryGate:
self.runner.check(any(l.startswith("Page 2: BadContinuationPointInvalid") for l in lines), "resume after the origin rebuild is invalid")
self.runner.check(any(l.startswith("Fresh: Good") for l in lines), "a fresh read after the rebuild succeeds")
report["rebuild"] = lines
# (c) a consumer session close releases the origin continuation. Each held read starts right after a deploy + re-browse:
# an idle projected node's authority lapses with its 15 s metadata lease and a re-browse served from the cached page
# does not renew it (a value Read is refused the same way — pre-existing v1 projection behaviour, reported).
# (c) a consumer session close releases the origin continuation. The restore's deploy retires cold projected nodes, so it
# re-browses; the held read then deliberately starts only after the node's 15 s metadata lease has LAPSED (#922: it
# renews on demand within the HistoryRead instead of answering BadUserAccessDenied).
self.restore()
time.sleep(LEASE_LAPSE_SECONDS)
consumer = self.runner.primary("consumer")
self.runner.check(self.origin_state() == 0, "no origin continuation open before")
counts = {}