NotificationIndex Content Column Size is too high #13935
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13934
With
MySql
in a giveninner index
the total of the included columns sizes should not be greater than3072
bytes, so with theutf8mb4_general_ci
not greater than 3072 / 4 =768 chars
. We already fixed the same issue for theAlias
column size that was a little too high, see #13585 (comment).So at least for
MySql
,NotificationIndexContentLength
which is equal to2500
is too high.For info when using directly
.QueryIndex<SomeIndex>()
it is useful that the related inner index include all columns, being a full inner index, this because.QueryIndex<SomeIndex>()
selects all columns. Most of our inner indexes are missing theId
column but we began to include it, see below.OrchardCore/src/OrchardCore.Modules/OrchardCore.PublishLater/Migrations.cs
Lines 34 to 42 in 4aadfbf
About the
NotificationIndex
table, its inner index is missing theId
column too and also theReadAtUtc
column, but because no direct.QueryIndex<NotificationIndex>()
is done, for now I let it as is.