Skip to content
Snippets Groups Projects

Dk issue 3 concurrent block query rebase

Merged Bartek Wrona requested to merge dk-issue-3-concurrent-block-query-rebase into develop
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
61 sql = """UPDATE hive_follows SET blacklisted = true
62 WHERE follower = :flr AND following = :flg"""
63 elif new_state == 4:
64 sql = """UPDATE hive_follows SET follow_blacklists = true
65 WHERE follower = :flr AND following = :flg"""
66 elif new_state == 5:
67 sql = """UPDATE hive_follows SET blacklisted = false
68 WHERE follower = :flr AND following = :flg"""
69 elif new_state == 6:
70 sql = """UPDATE hive_follows SET follow_blacklists = false
71 WHERE follower = :flr AND following = :flg"""
72 DB.query(sql, **op)
73
74 # track count deltas
75 if not DbState.is_initial_sync():
72 old_state = cls._get_follow_db_state(op['flr'], op['flg'])
  • @jsalyers why this code (if was good merged) is executed only when regular block processing is done ? i think it also should be executed during initial-sync.

  • @bwrona wrona @jsalyers took a look and it seems the code is correct, as-is. Avoiding this code in sync step is some kind of speedup. Instead of incrementing follower counts during syncing, they are computed at end of sync. Then incremented regularly during live operation.

    Edited by Dan Notestein
  • Please register or sign in to reply
  • Bartek Wrona mentioned in merge request !15 (closed)

    mentioned in merge request !15 (closed)

  • Bartek Wrona
  • 68 total_votes,
    69 flag_weight,
    70 ha_pa.name as parent_author,
    71 hpd_pp.permlink as parent_permlink,
    72 curator_payout_value,
    73 ha_ra.name as root_author,
    74 hpd_rp.permlink as root_permlink,
    75 max_accepted_payout,
    76 percent_hbd,
    77 allow_replies,
    78 allow_votes,
    79 allow_curation_rewards,
    80 beneficiaries,
    81 url,
    82 root_title
    83 FROM hive_posts hp
    • All such joins shall be hidden under a view which offers an interface required by API methods. Methods usually operates on author and permlink fields, so probably this join scheme is used often.

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • merged

  • Bartek Wrona mentioned in commit da61f5a3

    mentioned in commit da61f5a3

  • Please register or sign in to reply
    Loading