Skip to content

Conversation

@DavidWiseman
Copy link
Collaborator

Copilot AI review requested due to automatic review settings November 13, 2025 14:16

This comment was marked as outdated.

@DavidWiseman DavidWiseman requested a review from Copilot November 13, 2025 14:31
@DavidWiseman DavidWiseman force-pushed the 1635_RunningQueriesCursor branch from a4bdc4c to ac90390 Compare November 13, 2025 14:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 29 out of 31 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • DBADashGUI/Performance/RunningQueries.Designer.cs: Language not supported
  • DBADashServiceConfig/ServiceConfig.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


DELETE QT
DELETE TOP(@BatchSize) QT
FROM dbo.QueryText QT
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

The DELETE statement was changed from DELETE QT to DELETE TOP(@BatchSize) QT. This should have a corresponding OUTPUT clause like the cursor delete at line 36-38 to track deleted sql_handles, otherwise the @deleted table will only contain handles from cursor deletions. This creates an inconsistency where query text cleanup may not work correctly for all deleted running queries.

Suggested change
FROM dbo.QueryText QT
FROM dbo.QueryText QT
OUTPUT DELETED.sql_handle INTO @deleted(sql_handle)

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No output clause is needed here - we are using the @deleted table variable to determine what to delete from QueryText.

@DavidWiseman DavidWiseman merged commit 7be491c into trimble-oss:main Nov 13, 2025
@DavidWiseman DavidWiseman deleted the 1635_RunningQueriesCursor branch November 13, 2025 15:36
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.

1 participant