Skip to content

fix: preserve omitted offsets in date-property TTL updates - #2171

Open
HuaTNA wants to merge 1 commit into
weaviate:mainfrom
HuaTNA:fix/preserve-omitted-ttl-offset
Open

HuaTNA wants to merge 1 commit into
weaviate:mainfrom
HuaTNA:fix/preserve-omitted-ttl-offset

Conversation

@HuaTNA

@HuaTNA HuaTNA commented Sep 23, 2026

Copy link
Copy Markdown

Fixes #2170.

Keep ttl_offset=None unchanged in Reconfigure.ObjectTTL.delete_by_date_property, so partial updates preserve the existing offset. Previously, changing only filter_expired_objects also reset defaultTtl to zero and changed expiry timing. An explicit zero still resets the offset; the creation default remains zero.

Added tests for preserving positive/negative offsets, explicit zero and timedelta values, and the creation default. The two preservation cases fail before the fix. Afterward, test/collection/test_config_update.py and test/collection/test_config.py pass all 233 tests. Ruff lint/format, Flake8, and whitespace checks passed. No live-server integration test was run.

AI assistance was used to investigate, implement, and test this patch.

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@HuaTNA

HuaTNA commented Sep 23, 2026

Copy link
Copy Markdown
Author

I agree to the Weaviate Contributor License Agreement.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Partial date-property TTL updates reset an omitted offset to zero

2 participants