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


##########
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:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Doc claim contradicts column type</b></div>
   <div id="fix">
   
   The claim that the 65535-byte default 'comes from the historical maximum 
size of a MySQL TEXT column' is factually incorrect. The `position_json` column 
in `superset/models/dashboard.py` line 137 uses `MediumText` — not `TEXT` — 
which stores up to 16 MB on MySQL. The 65535 limit is a Python-level cap 
(configurable via `SUPERSET_DASHBOARD_POSITION_DATA_LIMIT`), independent of the 
database column capacity. Keep the configuration guidance; correct the database 
column explanation.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #cbd68a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
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