Skip to content

Setting document_ttl does not lead to any decrease in the database size #116

@krassowski

Description

@krassowski

Description

document_ttl does not actually decrease the size of the database.

Reproduce

  1. Install ipylab
  2. Run jupyter lab --SQLiteYStore.document_ttl=1
  3. Create a notebook with one cell:
from ipylab import JupyterFrontEnd
from time import sleep

app = JupyterFrontEnd()

for i in range(1000):
    app.commands.execute('notebook:insert-cell-below')
    sleep(1.1)
    app.commands.execute('notebook:delete-cell')
    sleep(1.1)
  1. Observe modifications in the SQLiteYStore around:
    https://github.com/jupyter-server/pycrdt-websocket/blob/3a5648dc937baca71eb9e997a6aaf8e3d6c91654/pycrdt_websocket/ystore.py#L489-L506
  2. Notice that squashed_update always increase in size, despite the notebook staying constant

Expected behavior

document_ttl actually influences the document TTL.

Context

pycrdt                    0.12.11
pycrdt-websocket          0.15.4
jupyterlab                4.4.0
jupyter-collaboration     4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions