diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-09-13 13:47:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 13:47:17 -0400 |
commit | 8b17bf9e42dd56ecd0fe8300da90bea5ee8684ef (patch) | |
tree | d9f3341228a2fe8f5994f56d524943f8702c5365 /store/storetest/mocks/SqlSupplier.go | |
parent | 0a5f792d2d6ceaa6c9bdb3050acbc4050c0c02f5 (diff) | |
download | chat-8b17bf9e42dd56ecd0fe8300da90bea5ee8684ef.tar.gz chat-8b17bf9e42dd56ecd0fe8300da90bea5ee8684ef.tar.bz2 chat-8b17bf9e42dd56ecd0fe8300da90bea5ee8684ef.zip |
MM-11886: materialize channel search (#9349)
* materialize PublicChannels table
Introduce triggers for each supported database that automatically maintain a subset of the Channels table corresponding to only public channels. This improves corresponding queries that no longer need to filter out 99% DM channels.
This initial commit modifies the channel store directly for easier code reviewing, but the next wraps an experimental version around it to enable a kill switch in case there are unforeseen performance regressions.
This addresses [MM-11886](https://mattermost.atlassian.net/browse/MM-11886) and [MM-11945](https://mattermost.atlassian.net/browse/MM-11945).
* extract the experimental public channels materialization
Wrap the original channel store with an experimental version that
leverages the materialized public channels, but can be disabled to
fallback to the original implementation.
This addresses MM-11947.
* s/ExperimentalPublicChannelsMaterialization/EnablePublicChannelsMaterialization/
* simplify error handling
* move experimental config listener until after store is initialized
Diffstat (limited to 'store/storetest/mocks/SqlSupplier.go')
-rw-r--r-- | store/storetest/mocks/SqlSupplier.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/store/storetest/mocks/SqlSupplier.go b/store/storetest/mocks/SqlSupplier.go new file mode 100644 index 000000000..4a844524d --- /dev/null +++ b/store/storetest/mocks/SqlSupplier.go @@ -0,0 +1,29 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +// Regenerate this file using `make store-mocks`. + +package mocks + +import gorp "github.com/mattermost/gorp" +import mock "github.com/stretchr/testify/mock" + +// SqlSupplier is an autogenerated mock type for the SqlSupplier type +type SqlSupplier struct { + mock.Mock +} + +// GetMaster provides a mock function with given fields: +func (_m *SqlSupplier) GetMaster() *gorp.DbMap { + ret := _m.Called() + + var r0 *gorp.DbMap + if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*gorp.DbMap) + } + } + + return r0 +} |