Wrong follower/following counts
On steemit.com I see this:
steemworld.org (using SDS) shows this:
There are some more accounts in my production hivemind node:
db=# select name,followers,following from hive_accounts where following<0 limit 10;
name | followers | following
-----------------+-----------+-----------
divia | 51 | -8
blordofficial | 6 | -1
sdfgtu | 1 | -1
bullionstackers | 7446 | -541
hezeqc | 0 | -1
zulkiflibayu | 7 | -1
luxalok | 11 | -1
(7 rows)
@only-dev-time Interesting, I wonder why the counts are different in your production node. Are you running a different version?
@steemchiller Yes, it's strange.
I have 3 hivemind nodes and two different counts.
poduction: bullionstackers | 7446 | -541 (current official db version 20; db build on a snapshot from @ety001)
testing 1: bullionstackers | 7446 | -541 (db version 21 with my bookmarks implementation; don't know if I used a snapshot)
testing 2: bullionstackers | 7448 | 1371 (db version 21 with bookmarks and new trending score; own sync)
@only-dev-time Okay, so the testing 2 instance looks to be almost correct when it comes to followers. Also the following count looks much better. Still a big difference to what I get with SDS though. Hard to tell what's the correct count here. In any case, part of the problem seems to be related to a snapshot that was created with an older version.
There is a force_recount method, does this help?
I would prefer to have it run a full resync, so we can be sure that the parser/indexer works as it should. We should then provide new snapshots from that clean state.
I tested some cases with @moecki.tests:
- [x] three new follows/unfollows in one transaction,
- [x] follow already followed accounts,
- [x] unfollow not followed accounts,
- [x] and some variations.
All are correct processed by hivemind and steemworld. (BTW @steemchiller: This transaction with wrong syntax caused an error on steemworlds account operations tab. Sorry)
I could run force_recount on testing1 before we fully resync.
@only-dev-time Thanks for the info! Should work now ;)
After force_recount there are better results:
db=# select name,followers,following from hive_accounts where following<0 limit 10;
name | followers | following
------+-----------+-----------
(0 rows)
db=# select name,followers,following from hive_accounts where name='bullionstackers';
name | followers | following
-----------------+-----------+-----------
bullionstackers | 7448 | 1961
I would suggest to add a optional start parameter to forcing recount in Sync.run() before updating the chain state.
#351 has been merged.
Haven't the causes of the quantity calculation error been confirmed yet?
https://steemit.com/@bullionstackers still shows a following count of -483. With SDS I get 2128.
I checked it on my testing2 hivenode:
before recount:
name | followers | following
-----------------+-----------+-----------
bullionstackers | 7453 | 2107
after recount:
name | followers | following
-----------------+-----------+-----------
bullionstackers | 7453 | 2128
Now it matched with SDS data. There is clearly a bug in hivemind when processing follow ops.
Now I'm running an observation script.