Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper Caplin's subscription listen #9821

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Proper Caplin's subscription listen #9821

merged 1 commit into from
Mar 27, 2024

Conversation

yperbasis
Copy link
Member

@yperbasis yperbasis commented Mar 27, 2024

Cherry pick PR #9734 into the release

## Subscription system

Sentinel has a time-based subscription system, which means that
subscriptions persists only until a specific point in time is reached.


```go=
func (sub *GossipSubscription) OverwriteSubscriptionExpiry(expiry time.Time) {
	sub.expiration.Store(expiry)
}
```

All gossip topics are joined which means we can publish at all times,
but not all gossip topics are listened to, which means we are not
listening for all topic's subscriptions. calling the function above will
keep make Caplin listen to that topic until `expiry`is reached. once
rached, the listener will be closed **but we can still publish** if we
set the expiry, so that now we need to listen again, then we will revive
the subscription.
@yperbasis yperbasis merged commit 6e66412 into release/2.59 Mar 27, 2024
6 checks passed
@yperbasis yperbasis deleted the pick_9734 branch March 27, 2024 09:48
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Kakkarrot pushed a commit to covalenthq/erigon that referenced this pull request Apr 17, 2024
Cherry pic PR erigontech#9734 into the release

Co-authored-by: Giulio rebuffo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants