asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: ASTERIXDB-1701: Fix log file boundry check
Date Fri, 21 Oct 2016 06:13:00 GMT
Murtadha Hubail has posted comments on this change.

Change subject: ASTERIXDB-1701: Fix log file boundry check
......................................................................


Patch Set 1:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/1306/1/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java
File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java:

Line 160:         // Make sure the log will not exceed the log file size
> +1- I'm confused as well, as to how we ever would have an appendPage whose 
Here is a simple scenario:
Log Page Size: 1MB
Log File Size: = 2xPages = 2MB

- First log record size = 1.9MB.
current page has space? false. Current file has a space? true. -> Allocate large page of
size 1.9MB and use it to write the log record (Only 0.1MB in the log file size left).

- Second log record size = 5k.
current page has space? false. Current file has a space? true. -> Use a small page of default
size (1MB).

- All coming logs after that have size 5k:
current page has space? true, write log.
This page will be filled with (5Ks) up to 1MB and will exceed the log file size (boundary).
However, if we check if the log file has space first, then we will not add any more logs to
the page, and will move to the next file.

I hope that makes it clear.

This doesn't need large pages to happen, since we have variable size logs, if the last log,
of what is supposed to be the last log page in the file, can still fit in the file (since
the check is based on offset and log size), the same thing will happen and a single log file
may be used forever.

I will be happy to discuss it further.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1306
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I538a8b931f3d50a00b092f218887a9731d14e235
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-Reviewer: Ian Maxon <imaxon@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Murtadha Hubail <hubailmor@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message