Is this a bug? (users ranking and reputation )
-
@baris said in Is this a bug? (users ranking and reputation ):
db.objects.find({_key: "users:reputation", value: "<uid_of_user>"});
Hi Baris,
Thank you for your support. Here's the output;
> db.objects.find({_key: "users:reputation", value: "967"}); { "_id" : ObjectId("5afaf7cb955f6475f7b7119f"), "_key" : "users:reputation", "value" : "967", "score" : -60 }
-
@baris also, user numbers are not consistent under different options...
Can you please check this, and then "user" tab...
number of users are different...
The same is true for this nodebb forum, can you check number of users and then the ones under "most reputation" tab?
Somehow, there is more users under "most reputation"... are purged/deleted users causing the confusion?
should I carry this to github?
-
Yes, seems like the issue is caused by the user count mismatch.
Can you run these queries to see the different values stored.
db.objects.findOne({_key: "global"}).userCount; db.objects.count({_key: "users:joindate"); db.objects.count({_key: "users:postcount"); db.objects.count({_key: "users:reputation");
-
@baris said in Is this a bug? (users ranking and reputation ):
db.objects.findOne({_key: "global"}).userCount;
> db.objects.findOne({_key: "global"}).userCount; 7935 > db.objects.count({_key: "users:joindate"}); 7935 > db.objects.count({_key: "users:postcount"}); 7959 > db.objects.count({_key: "users:reputation"}); 7969
-
Hi Baris,
We have upgraded to 1.13.3, but I think this problem is not gone completely...
In "most flags" user, number of users in each page is now 24... so, that is fixed...
But "most reputation" page, at the last page I still cannot see least reputed users... So, still not all users are on the list, FYI...
user count mismatch · Issue #8287 · NodeBB/NodeBB
We have different user counts under "users" / "post count" / "reputation"... db.objects.findOne({_key: "global"}).userCount; 7935 db.objects.count({_key: "users:joindate"}); 7935 db.objects.count({_key: "users:postcount"}); 7959 db.objec...
GitHub (github.com)
-
You might have to run this query to fix some invalid values in the user lists.
db.objects.updateMany({_key: "users:reputation", score: NaN}, {$set: {score: 0}});
I ran that to fix the issue on our forum and I can see negative users now. https://community.nodebb.org/users?section=sort-reputation&page=376