You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "rameeshm (via GitHub)" <gi...@apache.org> on 2025/08/16 01:36:03 UTC

[PR] RANGER-5287:Add sort by added user Id and action for the admin audit log [ranger]

rameeshm opened a new pull request, #629:
URL: https://github.com/apache/ranger/pull/629

   ## What changes were proposed in this pull request?
   
   Ranger admin audits where its stores the history of CRUD operations done on the ranger resource and policies updates needs to be sorted by added user and action done. This is more useful to track the changes done for datasets by sorting the logs.
   
   
   ## How was this patch tested?
   
   tested in the Docker container where ranger admin is brought up.
   


-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RANGER-5287:Add sort by added user Id and action for the admin audit log [ranger]

Posted by "rameeshm (via GitHub)" <gi...@apache.org>.
rameeshm commented on PR #629:
URL: https://github.com/apache/ranger/pull/629#issuecomment-3207410326

   @kumaab  @dineshkumar-yadav  Saw your comments now. I shall address this in subsequent patch for the same


-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RANGER-5287:Add sort by added user Id and action for the admin audit log [ranger]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #629:
URL: https://github.com/apache/ranger/pull/629#discussion_r2280120119


##########
security-admin/src/main/java/org/apache/ranger/service/RangerTrxLogV2Service.java:
##########
@@ -87,6 +87,8 @@ public RangerTrxLogV2Service() {
 
         sortFields.add(new SortField("id", "obj.id", true, SortField.SORT_ORDER.DESC));
         sortFields.add(new SortField("createDate", "obj.createTime", true, SortField.SORT_ORDER.DESC));

Review Comment:
   Adding a sort field for `addedByUserId` without a corresponding database index may lead to poor query performance. Consider adding a database index on the `added_by_id` column if it doesn't already exist, similar to the `action` column index being added in this PR.
   ```suggestion
           sortFields.add(new SortField("createDate", "obj.createTime", true, SortField.SORT_ORDER.DESC));
           // NOTE: Ensure that an index exists on the 'added_by_id' column in the database for efficient sorting and querying by 'addedByUserId', similar to the 'action' column.
   ```



-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RANGER-5287:Add sort by added user Id and action for the admin audit log [ranger]

Posted by "rameeshm (via GitHub)" <gi...@apache.org>.
rameeshm merged PR #629:
URL: https://github.com/apache/ranger/pull/629


-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org