Commits on Source (78)
-
-
-
-
-
-
-
-
-
refactor NewFollow class to optimize database inserts by using account IDs and handling missing records
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Splitting data into separate lists means they are applied in different order, which cause tests to fail. To fix this just put all items in one big list so that they are applied in order.
-
-
-
-
-
-
-
-
-
-
-
Instead sort by account name.
-
-
-
-
-
-
-
-
-
-
Seems to be unused.
-
-
This speeds up processing of follows.
-
Also, remove name to id map.
-
-
-
-
-
-
-
The functions was deleting too many records, because of missing check on following column.
-
-
The issue was that resets were not effective and were not deleting rows. This is because following is set to NULL in the incoming data. So, when the query was joining against accounts table, the resets rows were skipped, because there was no matching account. To fix this the JOIN on the following column needs to be LEFT JOIN.
-
-
-
-
-
-
Also rename is_muted to is_post_muted to avoid confusion.
-
-
-
-
-
This uses reptracker_endpoints.get_account_reputation function, but inlines the call. The first reason is that the function doesn't specify reptracker_app schema directly. Since hivemind doesn't have it in its search_path, the call fail. The second reason is that the calculation is modified to bring the resulting range closer to the scores from hive_accounts_rank_view.
-
-
`account_reputations` might not have all the accounts, so left join is needed.
-
-
In massive sync we operate an 1000 blocks at a time. Post notifications are filled by posts indexer, mutes are filled by follow indexer. If we process a 1000 blocks batch and there's a mute, it will be processed by the follow indexer, but this won't be seen by the posts indexer in this batch. This means that the posts notifications will be generated even for accounts that are muted. This essentially means that if there is a mute operation in a 1000 blocks batch, notifications for posts from that batch will not get that mute into account. So it would be possible for users to get notifications from an accounts they have recently muted. The fix is to clear any notifications from muted account at the end of the massive sync. The issue should not affect live mode, because we process only one block at a time.
-
-
-
-
-
-
-
Showing
- README.md 1 addition, 1 deletionREADME.md
- docs/follows.md 341 additions, 0 deletionsdocs/follows.md
- hive/db/db_state.py 20 additions, 7 deletionshive/db/db_state.py
- hive/db/schema.py 60 additions, 27 deletionshive/db/schema.py
- hive/db/sql_scripts/clear_muted_notifications.sql 11 additions, 0 deletionshive/db/sql_scripts/clear_muted_notifications.sql
- hive/db/sql_scripts/follow_ops.sql 408 additions, 0 deletionshive/db/sql_scripts/follow_ops.sql
- hive/db/sql_scripts/follows.sql 0 additions, 107 deletionshive/db/sql_scripts/follows.sql
- hive/db/sql_scripts/get_post_view_by_id.sql 5 additions, 6 deletionshive/db/sql_scripts/get_post_view_by_id.sql
- hive/db/sql_scripts/head_block_time.sql 9 additions, 1 deletionhive/db/sql_scripts/head_block_time.sql
- hive/db/sql_scripts/hive_muted_accounts_by_id_view.sql 9 additions, 9 deletionshive/db/sql_scripts/hive_muted_accounts_by_id_view.sql
- hive/db/sql_scripts/hive_post_operations.sql 108 additions, 76 deletionshive/db/sql_scripts/hive_post_operations.sql
- hive/db/sql_scripts/hive_posts_base_view.sql 2 additions, 2 deletionshive/db/sql_scripts/hive_posts_base_view.sql
- hive/db/sql_scripts/notifications_view.sql 7 additions, 78 deletionshive/db/sql_scripts/notifications_view.sql
- hive/db/sql_scripts/postgrest/bridge_api/bridge_api_does_user_follow_any_lists.sql 2 additions, 6 deletions...rest/bridge_api/bridge_api_does_user_follow_any_lists.sql
- hive/db/sql_scripts/postgrest/bridge_api/bridge_api_get_follow_list.sql 25 additions, 16 deletions...ripts/postgrest/bridge_api/bridge_api_get_follow_list.sql
- hive/db/sql_scripts/postgrest/bridge_api/bridge_api_get_relationship_between_accounts.sql 8 additions, 58 deletions...idge_api/bridge_api_get_relationship_between_accounts.sql
- hive/db/sql_scripts/postgrest/condenser_api/condenser_api_get_followers.sql 21 additions, 25 deletions...s/postgrest/condenser_api/condenser_api_get_followers.sql
- hive/db/sql_scripts/postgrest/condenser_api/condenser_api_get_following.sql 30 additions, 30 deletions...s/postgrest/condenser_api/condenser_api_get_following.sql
- hive/db/sql_scripts/postgrest/condenser_api/extract_parameters_for_get_following_and_followers.sql 10 additions, 14 deletions...pi/extract_parameters_for_get_following_and_followers.sql
- hive/db/sql_scripts/postgrest/utilities/get_account_posts.sql 5 additions, 5 deletions.../db/sql_scripts/postgrest/utilities/get_account_posts.sql
docs/follows.md
0 → 100644
hive/db/sql_scripts/follow_ops.sql
0 → 100644
hive/db/sql_scripts/follows.sql
deleted
100644 → 0