Skip to content

dmchen/try-codex-with-clue#34992

Open
cadem wants to merge 1 commit intorelease/ver-3.4.0.10from
dmchen/try-codex-with-clue
Open

dmchen/try-codex-with-clue#34992
cadem wants to merge 1 commit intorelease/ver-3.4.0.10from
dmchen/try-codex-with-clue

Conversation

@cadem
Copy link
Copy Markdown
Contributor

@cadem cadem commented Mar 30, 2026

Description

Issue(s)

  • Close/close/Fix/fix/Resolve/resolve: Issue Link

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

@cadem cadem requested review from a team, dapan1121 and guanshengliang as code owners March 30, 2026 08:07
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a local audit persistence feature, allowing audit information to be saved directly to the local cluster's audit database and bypassing the external taoskeeper module. Key changes include updating the audit library to manage internal database connections, modifying the client monitor to skip auditing for internal requests, and refactoring the test suite to validate local sink functionality. Review feedback identifies a resource leak in the audit cleanup routine due to a missing taos_cleanup() call and recommends removing auxiliary files like command.txt and requirement.txt that do not belong in the source repository.

(void)taosThreadMutexUnlock(&tsAudit.connLock);
(void)taosThreadMutexDestroy(&tsAudit.connLock);
(void)taosThreadMutexDestroy(&tsAudit.recordLock);
(void)taosThreadRwlockDestroy(&tsAudit.infoLock);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The auditInit function calls taos_init(), which allocates resources that must be freed. The corresponding taos_cleanup() call is missing in auditCleanup, which will lead to a memory leak. Please add taos_cleanup() at the end of this function.

  (void)taosThreadRwlockDestroy(&tsAudit.infoLock);
  taos_cleanup();

@@ -0,0 +1 @@
pytest cases/80-Components/01-Taosd/test_com_taosd_audit.py -q -s --log-level=DEBUG --clean No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This file appears to be a temporary file containing a test command for the developer's convenience. It should be removed from the pull request to keep the project history clean.

@@ -0,0 +1 @@
实现一个审计功能。目前的审计功能是将审计信息通过http发送给另外一个叫taoskeeper的独立模块(一个独立进程),再由taoskeeper再写到audit库中。现在要实现的审计功能是绕过taoskeeper,也就是不通过发送http消息,而是直接将审计信息保存到本地集群的audit库中。实现一下这个功能。一个可能的思路是,将发给taoskeeper的消息,通过节点间的rpc消息,发送给vnode,vnode收到这个消息后,模拟vnode从客户端收到的写入数据的消息,保存到审计库中。请详细深入的分析一下已有代码,并实现这个功能。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This file contains a feature description in Chinese, which seems to be a prompt for a code generation tool. Such files should not be included in the project's source control. Please remove it. Also, the filename requirement.txt is conventionally used for Python dependencies, which is misleading here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant