[GitHub] dspavlov commented on a change in pull request #5856: IGNITE-10974 Release page lock even if exception throws on beforeReleaseWrite

2019-01-18 Thread GitBox
dspavlov commented on a change in pull request #5856: IGNITE-10974 Release page 
lock even if exception throws on beforeReleaseWrite
URL: https://github.com/apache/ignite/pull/5856#discussion_r249042204
 
 

 ##
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
 ##
 @@ -1673,16 +1681,13 @@ private void setDirty(FullPageId pageId, long absPtr, 
boolean dirty, boolean for
 /**
  *
  */
-void beforeReleaseWrite(FullPageId pageId, long ptr, boolean pageWalRec) {
-if (walMgr != null && (pageWalRec || walMgr.isAlwaysWriteFullPages()) 
&& !walMgr.disabled(pageId.groupId())) {
-try {
-walMgr.log(new PageSnapshot(pageId, ptr, pageSize(), 
realPageSize(pageId.groupId(;
-}
-catch (IgniteCheckedException e) {
-// TODO ignite-db.
-throw new IgniteException(e);
-}
-}
+void beforeReleaseWrite(FullPageId pageId, long ptr, boolean pageWalRec) 
throws IgniteCheckedException {
+boolean walIsNotDisable = !walMgr.disabled(pageId.groupId());
 
 Review comment:
   walMgr != null check was missed. Before refactoring this code block with 
null WAL manager was not ever executed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #5856: IGNITE-10974 Release page lock even if exception throws on beforeReleaseWrite

2019-01-18 Thread GitBox
dspavlov commented on a change in pull request #5856: IGNITE-10974 Release page 
lock even if exception throws on beforeReleaseWrite
URL: https://github.com/apache/ignite/pull/5856#discussion_r249041543
 
 

 ##
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
 ##
 @@ -1543,24 +1543,32 @@ private void writeUnlockPage(
 if (markDirty)
 setDirty(fullId, page, markDirty, false);
 
-beforeReleaseWrite(fullId, page + PAGE_OVERHEAD, pageWalRec);
-
-long pageId = PageIO.getPageId(page + PAGE_OVERHEAD);
+try {
+beforeReleaseWrite(fullId, page + PAGE_OVERHEAD, pageWalRec);
+}
+catch (IgniteCheckedException e) {
 
 Review comment:
   Sorry, I've missed you removed try-catch in the method. Questions is not 
actual anymore


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services