bito-code-review[bot] commented on code in PR #41532:
URL: https://github.com/apache/superset/pull/41532#discussion_r3493615880


##########
docs/admin_docs/configuration/configuring-superset.mdx:
##########
@@ -549,6 +549,24 @@ CELERY_BEAT_SCHEDULE = {
 
 Adjust `retention_period_days` to control how long query rows are kept. 
Companion opt-in tasks (`prune_logs`, `prune_tasks`) exist for pruning the logs 
and tasks tables; see the commented-out examples in `superset/config.py`. 
Without enabling these tasks, the metadata database will grow unbounded over 
time.
 
+## Dashboard Layout Size Limit
+
+Each dashboard stores its layout (the position, size, and nesting of every 
chart, row, and tab) as a JSON blob in the metadata database. Superset caps the 
size of this blob with `SUPERSET_DASHBOARD_POSITION_DATA_LIMIT`, which defaults 
to `65535` bytes:
+
+```python
+SUPERSET_DASHBOARD_POSITION_DATA_LIMIT = 65535
+```
+
+The default of 65535 (2¹⁶ − 1) comes from the historical maximum size of a 
MySQL `TEXT` column. When the serialized layout reaches this limit, the editor 
blocks the save and reports the current size, the limit, and this setting's 
name. A warning is shown once the layout passes 90% of the limit.

Review Comment:
   <!-- Bito Reply -->
   The suggestion is correct. The database column `position_json` uses 
`MediumText`, which supports up to 16 MB, meaning the 65535-byte limit is 
indeed a configuration-level constraint rather than a database-level 
limitation. Updating the documentation to clarify this distinction improves 
accuracy.
   
   **docs/admin_docs/configuration/configuring-superset.mdx**
   ## Dashboard Layout Size Limit
   
   Each dashboard stores its layout (the position, size, and nesting of every 
chart, row, and tab) as a JSON blob in the metadata database. Superset caps the 
size of this blob with `SUPERSET_DASHBOARD_POSITION_DATA_LIMIT`, which defaults 
to `65535` bytes:
   
   ```python
   SUPERSET_DASHBOARD_POSITION_DATA_LIMIT = 65535
   ```
   
   This limit is a Python-level cap, independent of the database column 
capacity. When the serialized layout reaches this limit, the editor blocks the 
save and reports the current size, the limit, and this setting's name. A 
warning is shown once the layout passes 90% of the limit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to