Add dedicated indexes for repost counts and effective amounts for resolve #66
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#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "repost-count-index"
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?
Still looking at the changes, but checkpointing 1 comment.
Is there a significance to writing this as
cls.value_struct.unpack(data)
instead ofsuper().unpack_value(data)
. The latter is more common in this file, though they appear to be equivalent.Ditto for
value_struct.pack(data)
vssuper().pack_value(data)
.There isn't a reason - I'll update them to use super.
I don't see this being used in a meaningful way. Also name "total" implies it's a numerical value.
@ -1248,3 +1340,4 @@
# update or insert channel counts
for channel_hash, count in self.pending_channel_counts.items():
if count != 0:
channel_count_val = self.db.prefix_db.channel_count.get(channel_hash)
I'm kind of surprised to see this. Is it not possible to put & overwrite the existing values? There must be something in the framework that requires doing it this way that I am not aware of.
Have completed one pass.
@ -1248,3 +1340,4 @@
# update or insert channel counts
for channel_hash, count in self.pending_channel_counts.items():
if count != 0:
channel_count_val = self.db.prefix_db.channel_count.get(channel_hash)
Existing values can't be put on top of without first deleting them - nor can non-existent values be deleted. This allows easily undoing a series of changes since you can reverse their order and flip the deletes into puts and the puts into deletes.
As we chatted about, I would like to see the two fields named something that indicates
support_sum
is included in the other one.activated_sum
activated_support_sum
total_amount
support_amount
...or something along those lines.
effective_amount
doesn't immediately call to mind (claim amount + support amounts) for me as a newbie.