You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ibessonov (via GitHub)" <gi...@apache.org> on 2025/01/21 14:28:30 UTC

[PR] IGNITE-24277 Add necessary `log.isDebugEnabled()` checks in `ignite-page-memory` module [ignite-3]

ibessonov opened a new pull request, #5090:
URL: https://github.com/apache/ignite-3/pull/5090

   
   https://issues.apache.org/jira/browse/IGNITE-24277
   
   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-24277 Add necessary `log.isDebugEnabled()` checks in `ignite-page-memory` module [ignite-3]

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #5090:
URL: https://github.com/apache/ignite-3/pull/5090#discussion_r1924902939


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/freelist/PagesList.java:
##########
@@ -399,7 +404,9 @@ private void flushBucketsCache(IoStatisticsHolder statHolder) throws IgniteInter
         }
 
         if (lockedPages != 0) {
-            log.info("Several pages were locked and weren't flushed on disk [grp={}, lockedPages={}]", grpName, lockedPages);
+            if (log.isInfoEnabled()) {

Review Comment:
   Forgot about it



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-24277 Add necessary `log.isDebugEnabled()` checks in `ignite-page-memory` module [ignite-3]

Posted by "tkalkirill (via GitHub)" <gi...@apache.org>.
tkalkirill commented on code in PR #5090:
URL: https://github.com/apache/ignite-3/pull/5090#discussion_r1924862024


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/freelist/PagesList.java:
##########
@@ -91,6 +91,7 @@ public abstract class PagesList extends DataStructure {
 
     /** Logger. */
     protected final IgniteLogger log;
+    private final boolean debugLogEnabled;

Review Comment:
   Please add a comment that this is for optimization.



##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/replacement/DelayedPageReplacementTracker.java:
##########
@@ -185,7 +185,9 @@ public void waitUnlock(FullPageId id) {
                 boolean interrupted = false;
 
                 while (locked.contains(id)) {
-                    log.debug("Found replaced page which is being written to page store, wait for finish replacement [id={}]", id);
+                    if (log.isDebugEnabled()) {

Review Comment:
   Why don't you use the field?



##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/freelist/PagesList.java:
##########
@@ -399,7 +404,9 @@ private void flushBucketsCache(IoStatisticsHolder statHolder) throws IgniteInter
         }
 
         if (lockedPages != 0) {
-            log.info("Several pages were locked and weren't flushed on disk [grp={}, lockedPages={}]", grpName, lockedPages);
+            if (log.isInfoEnabled()) {

Review Comment:
   Why don't you use the field?



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-24277 Add necessary `log.isDebugEnabled()` checks in `ignite-page-memory` module [ignite-3]

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov commented on code in PR #5090:
URL: https://github.com/apache/ignite-3/pull/5090#discussion_r1924903387


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/replacement/DelayedPageReplacementTracker.java:
##########
@@ -185,7 +185,9 @@ public void waitUnlock(FullPageId id) {
                 boolean interrupted = false;
 
                 while (locked.contains(id)) {
-                    log.debug("Found replaced page which is being written to page store, wait for finish replacement [id={}]", id);
+                    if (log.isDebugEnabled()) {

Review Comment:
   Not necessary here, this code is not as hot as PagesList



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-24277 Add necessary `log.isDebugEnabled()` checks in `ignite-page-memory` module [ignite-3]

Posted by "ibessonov (via GitHub)" <gi...@apache.org>.
ibessonov merged PR #5090:
URL: https://github.com/apache/ignite-3/pull/5090


-- 
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: notifications-unsubscribe@ignite.apache.org

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