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

relay splitter daemon + pebble persistence #810

Conversation

brianolson
Copy link
Contributor

stack PR on top of #807
Add Pebble db based persister
clean up tests in events/

binary.BigEndian.PutUint64(key[8:16], nowMillis)
binary.BigEndian.PutUint32(key[16:], pp.prevSeqExtra)

err = pp.db.Set(key[:], blob, pebble.Sync)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error ignored

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, we should just ignore -1 sequence number events (info, error, etc)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it throwing away non-sequence events, but then figured out this clever way to include them in order

Did string `gorm:"uniqueIndex"`
PDS uint
}
type User = pdsdata.User
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels like a superfluous change to include in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I was working on the unit tests, and the tests were in a different package which was weird, so I fixed that and then had to move a data definition to fix a circular dependency.

@brianolson
Copy link
Contributor Author

TODO: There's a pebble API "EstimateDiskUsage()", it would be fun to put that in a gauge. It's probably a little expensive so put that on a ~(1-5 minute) loop to set the gauge?
https://github.com/cockroachdb/pebble/blob/v1.1.2/db.go#L2212

Bonus round: use that to maintain a target size of the on disk buffer at e.g. 1TB rather than (N hours)
(definitely leave that for version 1.1 a week or more out)

@brianolson
Copy link
Contributor Author

TODO: I think we still have a TODO of using the pebble store's "get last entry" to set the sequence we fetch ?since={} from the upstream firehose

brianolson and others added 11 commits November 15, 2024 10:05
- limits on HTTP idle connections. mostly impacts did:web and HTTPS
handle resolution, which can otherwise result in huge numbers of sockets
hanging around (one per custom domain) when operating at scale. values
chosen should not have too bad an impact on PLC usage, though we might
want to split out separate PLC and non-PLC HTTP clients at some point
- drop some timeouts
@brianolson brianolson mentioned this pull request Nov 18, 2024
@brianolson
Copy link
Contributor Author

merged as #818

@brianolson brianolson closed this Nov 21, 2024
@brianolson brianolson deleted the feat/splitter-rebase branch November 21, 2024 05:17
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.

4 participants