Add dedicated indexes for repost counts and effective amounts for resolve #66

Merged
jackrobison merged 12 commits from repost-count-index into master 2022-09-13 19:46:15 +02:00
jackrobison commented 2022-07-29 15:54:32 +02:00 (Migrated from github.com)
No description provided.
moodyjon (Migrated from github.com) reviewed 2022-08-02 21:06:44 +02:00
moodyjon (Migrated from github.com) left a comment

Still looking at the changes, but checkpointing 1 comment.

Still looking at the changes, but checkpointing 1 comment.
moodyjon (Migrated from github.com) commented 2022-08-02 20:42:47 +02:00

Is there a significance to writing this as cls.value_struct.unpack(data) instead of super().unpack_value(data). The latter is more common in this file, though they appear to be equivalent.

Ditto for value_struct.pack(data) vs super().pack_value(data).

Is there a significance to writing this as ```cls.value_struct.unpack(data)``` instead of ```super().unpack_value(data)```. The latter is more common in this file, though they appear to be equivalent. Ditto for ```value_struct.pack(data)``` vs ```super().pack_value(data)```.
jackrobison (Migrated from github.com) reviewed 2022-08-10 19:56:22 +02:00
jackrobison (Migrated from github.com) commented 2022-08-10 19:56:21 +02:00

There isn't a reason - I'll update them to use super.

There isn't a reason - I'll update them to use super.
moodyjon (Migrated from github.com) reviewed 2022-08-14 20:21:51 +02:00
moodyjon (Migrated from github.com) commented 2022-08-14 20:21:51 +02:00

I don't see this being used in a meaningful way. Also name "total" implies it's a numerical value.

I don't see this being used in a meaningful way. Also name "total" implies it's a numerical value.
moodyjon (Migrated from github.com) reviewed 2022-08-14 20:44:01 +02:00
@ -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)
moodyjon (Migrated from github.com) commented 2022-08-14 20:44:01 +02:00

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.

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.
moodyjon (Migrated from github.com) approved these changes 2022-08-14 20:56:12 +02:00
moodyjon (Migrated from github.com) left a comment

Have completed one pass.

Have completed one pass.
jackrobison (Migrated from github.com) reviewed 2022-08-18 19:16:59 +02:00
@ -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)
jackrobison (Migrated from github.com) commented 2022-08-18 19:16:59 +02:00

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.

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.
moodyjon (Migrated from github.com) reviewed 2022-09-08 20:34:57 +02:00
moodyjon (Migrated from github.com) commented 2022-09-08 20:34:57 +02:00

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.

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.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/hub#66
No description provided.