Skip to content

Conversation

zby1101
Copy link

@zby1101 zby1101 commented Jun 27, 2025

HistoryConfigInfoMapperByPostgresql方法下重写增加pageFindConfigHistoryFetchRows

@CLAassistant
Copy link

CLAassistant commented Jun 27, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

lingma-agents bot commented Jun 27, 2025

修复PostgreSQL数据源历史配置分页查询功能

变更概述

问题修复

  • 组件: HistoryConfigInfoMapperByPostgresql
  • 功能描述: 新增 pageFindConfigHistoryFetchRows 方法,实现历史配置记录的分页查询功能。
  • 实现细节:
    • 生成 SQL 查询语句,筛选 data_idgroup_idtenant_id 条件,按 nid 倒序排序,通过 LIMITOFFSET 实现分页。
    • 参数绑定通过 context 对象提取 data_idgroup_idtenant_id,并传递分页参数 pageSizestartRow
  • 修复目的: 解决使用 PostgreSQL 作为数据源时,历史配置版本列表无法分页加载的问题,确保用户可完整查看历史配置记录。
变更文件
文件路径 变更说明
nacos-datasource-plugin-ext/​nacos-postgresql-datasource-plugin-ext/​src/​main/​java/​com/​alibaba/​nacos/​plugin/​datasource/​impl/​postgresql/​HistoryConfigInfoMapperByPostgresql.​java 新增分页查询历史配置的方法 `pageFindConfigHistoryFetchRows`,修复 PostgreSQL 数据源的历史配置分页功能缺失。
时序图
sequenceDiagram
    participant Client as 客户端请求
    participant HC as HistoryConfigInfoMapperByPostgresql
    participant DB as PostgreSQL数据库
    Client->>HC: 调用 pageFindConfigHistoryFetchRows()
    HC->>DB: 执行分页查询 SQL(LIMIT + OFFSET)
    DB-->>HC: 返回分页结果数据
    HC-->>Client: 返回 MapperResult 对象
Loading

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

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