tongwl opened a new pull request, #14489:
URL: https://github.com/apache/dolphinscheduler/pull/14489

   <!--Thanks very much for contributing to Apache DolphinScheduler, we are 
happy that you want to help us improve DolphinScheduler! -->
   
   ## Purpose of the pull request
   #### MyBatis-Plus pagination disorder optimization.
   
   
   
   
   >EN: Hi team, while using MyBatis-Plus, I encountered a minor issue with 
pagination. In our application, I observed that the pagination data was 
duplicated or lost. I guess this issue occurred on the datasource list page, 
where I directly inserted some data into the database without including the 
'update time' field. The SQL query used for querying the datasource list was 
ordered by 'update time', which caused the issue on our page. I am not sure if 
a similar issue would occur when the 'update time' field is present. I also 
tried to search for solutions on Google, and found that MyBatis-Plus pagination 
issues are quite common. Although I found that many places in the code only use 
'order by create time' or 'order by update time', I have submitted a small PR 
specifically for the datasource issue. If it is necessary to optimize other 
areas, I can submit more commits. Attached are the screenshots for reproducing 
the issue.
   
   >CN: Hi 
team,在使用中,我发现了mybatis-plus分页的一个小问题,在我们的应用中,出现了分页数据重复和丢失的现象。我们发生的场景是在datasource 
list页面,我们在数据库应该是直接插入了一些数据,这些数据并没有带上update 
time(都是null的数据可能导致了它的不唯一性),而查询datasource list的sql是order by update 
time,所以导致页面分页数据出现了问题。我没有去测试当updateTime存在但是有重复值是否有这个现象(goole说有),我也尝试google了下,好像mybatis-plus
 分页问题还是挺常见的,虽然在代码中我发现很多地方都只有order by create time, order by update 
time,但我仅仅先尝试提交了一个关于datasource的小pr,如果它是有必要被优化的,我可以再去把其他的也包括进来,以下是我的问题复现截图。
   <img width="1720" alt="image" 
src="https://github.com/apache/dolphinscheduler/assets/13530192/f3fb8403-0664-4f5d-bd46-899ba8292a67";>
   <img width="1711" alt="image" 
src="https://github.com/apache/dolphinscheduler/assets/13530192/225bfc4b-7a3a-4556-8324-2c69a448e6fc";>
   <img width="1725" alt="image" 
src="https://github.com/apache/dolphinscheduler/assets/13530192/be3cfe70-a48a-4114-b9b4-351c2b47094b";>
   <img width="1723" alt="image" 
src="https://github.com/apache/dolphinscheduler/assets/13530192/a8588c36-6ed1-4114-99a5-7c95e3c607a8";>
   <img width="734" alt="image" 
src="https://github.com/apache/dolphinscheduler/assets/13530192/26f17b9f-39d4-4205-85b6-9c375bd05ef3";>
   
   
   Thanks, team
   
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   ## Brief change log
   
   <!--*(for example:)*
   - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   This pull request is code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please 
describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   <!--*(example:)*
   - *Added dolphinscheduler-dao tests for end-to-end.*
   - *Added CronUtilsTest to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   (or)
   
   If your pull request contain incompatible change, you should also add it to 
`docs/docs/en/guide/upgrede/incompatible.md`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to