Comments (10)
Going to close this as the PR is now reverted and cherry-picked.
from mattermost.
In my case there were roughly 800 occurrences (I am running a very small instance of Mattermost though). Executing your UPDATE statement seems to have fixed the issue. A colleague of mine also noted that leaving/re-joining the channel worked for him, though that is obviously no viable solution and does not even work for default channels, which do not allow leaving.
Thanks for addressing this!
Cheers
Thomas
from mattermost.
Is it safe to run that UPDATE ChannelMembers SET SchemeGuest = false WHERE SchemeGuest IS NULL;
and it will not break anything in the future?
from mattermost.
@TwizzyDizzy Would you be able to confirm your current schema and the data for the specific entry failing?
Using psql
client you can run:
\d+ channelmembers;
And
SELECT * FROM ChannelMembers WHERE ChannelId = 'girsg48543bqteppqphy97xhuw' AND UserId = '14ocq7hp3by9ic95f7zqr1mjcw';
from mattermost.
Yes, of course, here you go:
\d+ channelmembers;
Table "public.channelmembers"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
--------------------+------------------------+-----------+----------+---------+----------+-------------+--------------+-------------
channelid | character varying(26) | | not null | | extended | | |
userid | character varying(26) | | not null | | extended | | |
roles | character varying(256) | | | | extended | | |
lastviewedat | bigint | | | | plain | | |
msgcount | bigint | | | | plain | | |
mentioncount | bigint | | | | plain | | |
notifyprops | jsonb | | | | extended | | |
lastupdateat | bigint | | | | plain | | |
schemeuser | boolean | | | | plain | | |
schemeadmin | boolean | | | | plain | | |
schemeguest | boolean | | | | plain | | |
mentioncountroot | bigint | | | 0 | plain | | |
msgcountroot | bigint | | | 0 | plain | | |
urgentmentioncount | bigint | | | | plain | | |
Indexes:
"channelmembers_pkey" PRIMARY KEY, btree (channelid, userid)
"idx_channelmembers_channel_id_scheme_guest_user_id" btree (channelid, schemeguest, userid)
"idx_channelmembers_user_id_channel_id_last_viewed_at" btree (userid, channelid, lastviewedat)
Access method: heap
select statement
channelid | userid | roles | lastviewedat | msgcount | mentioncount | notifyprops | lastupdateat | schemeuser | schemeadmin | schemeguest | mentioncountroot | msgcountroot | urgentmentioncount
----------------------------+----------------------------+-------+---------------+----------+--------------+----------------------------------------------+---------------+------------+-------------+-------------+------------------+--------------+--------------------
girsg48543bqteppqphy97xhuw | 14ocq7hp3by9ic95f7zqr1mjcw | | 1704458170326 | 2517 | 0 | {"desktop": "default", "mark_unread": "all"} | 1704458170326 | t | t | | 0 | 1787 | 0
(1 row)
Cheers
Thomas
from mattermost.
Thanks for confirming @TwizzyDizzy. This is an issue we are addressing. In the meantime you could technically fix it by updating the NULL
schemeguest
entries in those database rows.
I'd check how many these are:
SELECT COUNT(*) FROM ChannelMembers WHERE SchemeGuest IS NULL;
And consider updating them with:
UPDATE ChannelMembers SET SchemeGuest = false WHERE SchemeGuest IS NULL;
from mattermost.
Created https://mattermost.atlassian.net/browse/MM-56465 to track this issue internally.
from mattermost.
If anything it's half broken now. Yes it should be safe, but as usual with any DB operation, a backup is always recommended.
from mattermost.
Alternatively: Downgrading to 9.3.0 works as well (at least it did for us)
from mattermost.
Yes, downgrading can be an option as well given this is an issue introduced in 9.4
from mattermost.
Related Issues (20)
- Grammar fault in french version HOT 1
- mmctl auth list output is ill formatted if username is short HOT 2
- Quartz Theme - "Jump to recents" toast text isnt clearly visible HOT 4
- Pasting text using crtl+v onto a text should only create a link if an URL is passed HOT 7
- Add past as plain text option to Desktop App HOT 2
- Add toggle to switch between plain view and formatted view in system logs page HOT 2
- Browse Channels modal buttons are not having consistent styling HOT 1
- API examples imply incorrect order HOT 2
- Accessibility: channel list scrollbar is hard to use, and inconsistent with rest of app HOT 4
- ENORMOUS BUG: tab nickname completion can obliterate message / post after HOT 3
- Update 9.4 and after are breaking focalboard HOT 4
- iOS app only: Bot tag missing on at-user autocomplete
- /playbook autocomplete lists non-existent list command HOT 1
- Duplicate option names cannot be selected in interactive dialogs
- Official docker image page contains broken link HOT 2
- Official docker container - arm64 builds? HOT 2
- FileSettings.AmazonS3SSL getting value error in plugin HOT 4
- RN: Search results scroll area cutting off content in some scenarios
- RestApi view channel endpoint doesn't work as before
- After version upgrade - Users with Member Access unable to access any channel or DM. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost.