High Number of Groups leads to Problem with Rules (assets table) #39208
Replies: 5 comments 1 reply
-
offhand, (quick google search), TEXT, BLOB and VARCHAR for INNODB are stored inline with the table. So likely no technical difference other than performance. Since MySQL 5.7.8 a native JSON data type is supported, but Joomla supports MySQL 5.1 as a minimum so that's not an option yet. PostgreSQL support's JSON columns at v9.2 and MSSQL support's JSON columns at SQLSRV 2016 I would agree that MEDIUMTEXT might be a better choice than VARCHAR since it's good for large json bodies, at least until JSON columns are an available option in the Joomla minimum requirements. (note: The space required to store a JSON document is roughly the same as for LONGBLOB or LONGTEXT but limited to the value of the max_allowed_packet system variable) but note due to the sql versions that support JSON it's a long ways off to change to a pure JSON column format. but with that said there are some trade-offs In the long run to get the type of expected result you want "unlimited groups with unlimited individual rules" additional consideration will likely need to be taken for the ALC storage and overall asset table design. |
Beta Was this translation helpful? Give feedback.
-
If you have a patience:
IMO the best would be to use TEXT / VARCHAR(someLimit) on table with ROW_FORMAT=COMPRESSED. |
Beta Was this translation helpful? Give feedback.
-
This problem does not only come up with many groups but all so with many permissions like this component I would say Sure we can wait for the DB to improve, but for now if using a 3rd party component with huge permission structures
This may be a temp fix, but if not used the whole permissions structure breaks once the field size is reacted, and this causes unexpected behavior. |
Beta Was this translation helpful? Give feedback.
-
@michaelulm are you still experiencing this issue with the latest J3? |
Beta Was this translation helpful? Give feedback.
-
even i think this is a valid point, i also think this deserve a broader "discussion" |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce the issue
we are using groups object to represent "customers". now we reached a "high" number of groups, more than 150.
The main problem happens when several groups has some special permissions which are not inherits from parents, and when we disallow a special rule. in this way the json string increase and cannot be inserted / updated into the assets table
Expected result
endless groups with individual rules should work
Actual result
if we reach too many individual rule settings some groups, all settings get lost. we used a workaround to config rules column with VARCHAR(16000), but we think, that will not be enough. is it possible to use TEXT as default, or maybe MEDIUMTEXT or LONGTEXT, to support high number of groups and individual rules settings.
System information (as much as possible)
joomla 3.6.5
Additional comments
is there any known reason, that TEXT type wouldn't work in assets table at rules column?
Beta Was this translation helpful? Give feedback.
All reactions