Skip to content

feat(ts): Support IGNORE option when creating TimeSeries#3450

Open
lauk20 wants to merge 9 commits into
apache:unstablefrom
lauk20:ts-ignore-option
Open

feat(ts): Support IGNORE option when creating TimeSeries#3450
lauk20 wants to merge 9 commits into
apache:unstablefrom
lauk20:ts-ignore-option

Conversation

@lauk20
Copy link
Copy Markdown
Contributor

@lauk20 lauk20 commented Apr 14, 2026

Resolves issue #3215.

AI Usage: AI was used to write the initial draft and tests. Manually reviewed the code logic to verify and fix issues.

Copy link
Copy Markdown
Member

@jihuayu jihuayu left a comment

Choose a reason for hiding this comment

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

It looks like this PR will cause backward incompatibility with old data.
We should probably draft a proposal for the storage format changes.

Comment thread src/storage/redis_metadata.cc Outdated
Comment thread tests/gocase/unit/type/timeseries/timeseries_test.go Outdated
@jihuayu
Copy link
Copy Markdown
Member

jihuayu commented May 9, 2026

Hi @lauk20. If you want to move forward with this PR, please fix the format and lint CI errors. Thanks

@lauk20
Copy link
Copy Markdown
Contributor Author

lauk20 commented May 9, 2026

Hi @lauk20. If you want to move forward with this PR, please fix the format and lint CI errors. Thanks

@jihuayu Thanks for the update. I have committed a fix for the lint.

@git-hulk git-hulk requested a review from jihuayu May 10, 2026 12:49
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 12, 2026

Copy link
Copy Markdown
Member

@jihuayu jihuayu left a comment

Choose a reason for hiding this comment

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

From what I can see, this change is both backward and forward compatible. Great job on the refactoring.

This is a fairly large change, so it took me some time to go through it all. Those are my thoughts for now. Thanks! @lauk20

Comment thread src/types/redis_timeseries.h Outdated
DUPLICATE_POLICY = 1 << 2,
IGNORE = 1 << 3,
LABELS = 1 << 4,
LABELS = 1 << 3,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We change the LABELS value. Why we need change it?

You can use comments to indicate that this item is not being used.

require.ErrorContains(t, rdb.Do(ctx, "ts.add", key, "1000", "13.4").Err(), "update is not supported when DUPLICATE_POLICY is set to BLOCK mode")
})

t.Run("TS.ADD Ignore Option", func(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The test cases are missing a significant number of negative scenarios where parameters fail to take effect. Could you please add them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. I have added more test scenarios for the IGNORE option. @jihuayu

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.

2 participants