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