Commit ea3af037 authored by Dan Notestein's avatar Dan Notestein
Browse files

Remove advisory lock contention between votes and posts flush

The advisory lock (777) was being used by both votes.py and posts.py
during parallel flush operations, causing serialization that defeated
the purpose of parallel flushing.

Analysis showed that:
- votes.py updates: rshares, abs_rshares, sc_hot, sc_trend, total_votes, net_votes
- posts.py updates: total_payout_value, curator_payout_value, author_rewards, etc.

These update completely disjoint columns of hive_posts, so PostgreSQL's
native row-level locking is sufficient. The advisory lock was unnecessary
and was causing ~15-25% performance degradation during massive sync.
parent 9ef1110a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment