I just upgraded to 3.8.2. Unfortunately the behaviour is unchanged.
It also seems to be getting more prevalent (by which I mean the number of users missing in autocomplete seems to be increasing, and more users are noticing the problem and getting frustrated).
Even worse, it’s hard to open direct chats to affected users - creating a chat and typing in their username doesn’t work (they’re not in the popup, but even if you type their correct username anyway, you can’t add them to the list). The only way I know of to open a direct chat is to click on their avatar in a channel and use the Send Message link, which does still work.
There are no errors in the log since restart (set to INFO level).
This has become a fairly big problem for us. I am surprised nobody else has reported it - I am wondering what could be different in our installation.
One more observation: if we just type the @ sign, then the pop-up list is complete and we can scroll through and see everyone; it’s only as we start to type letters that we get incomplete results.
I’ve just had a thought but will need you to test it out to see whether this might be your issue…
Can you go to your “Town Square” channel and
type @ in the center channel message box
in the search box type in:town-square from:
Can you compare the list of names that appears for 1. and 2. above and let me know whether they’re the same?
I think the issue you might be experiencing is that typing @ in any channel only brings up a list of channel members whereas typing from: in the search box brings up a list of all users on the team.
OK, so just looking at users whose usernames start with c as an example:
in Town Square, type @ and then scroll down
under C, I see all 18 users whose usernames start with c
in Town Square, type @c
under C, I now only see 4 users
in the search box, type from:
under C, I see all 18 users
in the search box, type from:c
under C, I see only 4 (the same 4 as above)
in the search box, type in:town-square from:
under C, I see all 18 users
in the search box, type in:town-square from:c
under C, I see only 4 (the same 4 as above)
The filtering by letter always seems to cut out the same users regardless of the channel in which I do it (or indeed the dialog used to create new Direct Messages, as mentioned). I think something is going wrong in that filtering.
When using from: in the searchbox, your own logged in username will also appear in the list so this will add one user to the overall list (as you can also search for messages from yourself).
That said, I’m not able to reproduce the disappearing users as you’ve detailed in your steps above. I’m thinking it might be because there is a problem with the GitLab omnibus installation.
I’m going to link in @eric, one of our product specialists who might be able to shed some light on the issue.
Let’s see whether we can get to the root cause of your issue!
Thanks @lindy65 (but note we’re not using the GitLab omnibus installation)
In other news, I reverse-engineered the MySQL query that I believe will get run on the server for such autocomplete queries, having traced it back to https://github.com/mattermost/platform/blob/master/store/sql_user_store.go. For our Town Square channel, with just “c” as the search term, I believe it would be this:
SELECT Users.FirstName FROM Users, ChannelMembers WHERE ChannelMembers.ChannelId = '8r95qhjqgirhmpx6nxt6f83kuh' AND ChannelMembers.UserId = Users.Id AND MATCH(Username, FirstName, LastName, Nickname, Email) AGAINST ('+c*' IN BOOLEAN MODE);
Interestingly, the results of this again include only 4 users with usernames starting with c (not all 18). If I understand the query right, it should include all 18 users whose usernames start with c. I played with some variations of the query and got some rather odd results. I wonder if there’s some issue with our MySQL version, or the index is corrupt or something?
Ah sorry, I misunderstood. I see you’re just using GitLab for auth!
I’m sure Eric will have some additional thoughts / suggestions. In the meantime, thought I’d let you know that we are working on improving search and have elastic search on the roadmap for next release on May 16th.
@eric, since the queries I run directly produce the same results as the autocompletes in the client, I think it must be an issue with our DB - do you agree? I just don’t get results I understand for those queries…
@eric / @lindy65 - this appears to be resolved after running optimize table Users on our database, to force re-creation of indices. The SQL queries seem to work as expected and our autocompletes look like they’re working again.
I am not sure how the index got in a bad state in the DB but likely nothing to do with mattermost itself!