fix: [6789525493] Fix tsma drop with if exists.#34858
Open
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make DROP TSMA IF EXISTS succeed when the target TSMA does not exist (instead of returning sma not exist), and adds a regression test for that behavior.
Changes:
- Suppress parser error logging for the expected “TSMA not exist” condition when fetching TSMA metadata.
- Update
translateDropTSMAto treatTSDB_CODE_MND_SMA_NOT_EXISTas success whenIF EXISTSis specified. - Add a regression test that drops a non-existent TSMA with
IF EXISTS.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/cases/19-TSMAs/test_tsma.py |
Adds regression coverage for dropping a missing TSMA with IF EXISTS. |
source/libs/parser/src/parUtil.c |
Avoids emitting parser error logs for TSDB_CODE_MND_SMA_NOT_EXIST from TSMA cache lookups. |
source/libs/parser/src/parTranslater.c |
Adjusts TSMA lookup/error handling during drop translation to support IF EXISTS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
226e7ea to
fbab8ed
Compare
dapan1121
reviewed
Mar 20, 2026
|
|
||
| PAR_ERR_JRET(getTsma(pCxt, &name, &pTsma)); | ||
| code = getTsma(pCxt, &name, &pTsma); | ||
| if (code == TSDB_CODE_MND_SMA_NOT_EXIST) { |
Contributor
There was a problem hiding this comment.
这个处理有点简单,能不能请求不要发送到服务端,因为缓存可能不一致,如果这时候服务端有了这个tsma,请求又没有带stream信息,那结果就不一定了
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.