Improve memory usage during initial ES sync #57
No reviewers
Labels
No labels
area: database
area: documentation
area: elasticsearch
area: herald
area: packaging
area: scribe
consider soon
critical
dependencies
good first issue
hacktoberfest
help wanted
improvement
needs: repro
new feature
priority: blocker
priority: high
priority: low
priority: medium
type: bug
type: bug-fix
type: discussion
type: feature request
type: improvement
type: new feature
type: refactor
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/hub#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "faster-es-sync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
updates ES sync to use batched claim fetching shared by resolve
I don't see anything critical. Added some suggestions (that can be done in other PRs too), but otherwise looks good.
@ -150,0 +91,4 @@
reposted_fee_amount = 0
else:
reposted_fee_amount = int(max(reposted_metadata.stream.fee.amount or 0, 0) * 1000)
if reposted_fee_amount >= 9223372036854775807:
suggestion: if this is a dict of {tx_hash: nout} you may be able to avoid the two transformations on get_claim_metadatas, reusing the same data structure
@ -150,0 +116,4 @@
reposted_claim_hash) or self.blocked_channels.get(claim_hash) or self.blocked_channels.get(
reposted_claim_hash) or self.blocked_channels.get(claim.channel_hash)
filtered_hash = self.filtered_streams.get(claim_hash) or self.filtered_streams.get(
reposted_claim_hash) or self.filtered_channels.get(claim_hash) or self.filtered_channels.get(
probably not in this PR, but would be nice to extract those huge numbers to something with meaningful names
maybe aggregate and log once?
@ -150,0 +91,4 @@
reposted_fee_amount = 0
else:
reposted_fee_amount = int(max(reposted_metadata.stream.fee.amount or 0, 0) * 1000)
if reposted_fee_amount >= 9223372036854775807:
It has to also handle the case where you're requesting multiple outputs from the same tx