[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13925687#comment-13925687
 ] 

Ivan Kelly commented on BOOKKEEPER-716:
---------------------------------------

After a lot of searching, the case seems legit. There's really not much 
concrete info on partial sector write though. [1] links to some good info.

So, I reviewed the patch. There's a couple of issues I have with it.

1. it's a breaking change. If a user upgrades to 4.3.0 with this patch, they 
won't be able to roll back to to 4.2.2 if there's a problem with 4.3.0. For 
this reason, I'd make this configurable and off by default for now, until 4.3 
is stabilized (4.3.1 or 4.3.2 i would guess).
2. the padding should take place in journalchannel. writePaddingBytes reaches 
into it a lot anyhow. 
3. There's no need for the length of the padding to be written. Instead, all 
writes in JournalChannel should pad to the 512 boundary, and all reads should 
start at the next 512 boundary after the position.
4. sector size should be configurable. some disks about 4K sectors now. Also, 
SSDs. have you folks tried journalling to SSDs?

[1] http://jrtipton.tumblr.com/post/906649351/atomic-sector-writes



> padding writes for bookie journal
> ---------------------------------
>
>                 Key: BOOKKEEPER-716
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-716
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.3.0
>
>         Attachments: BOOKKEEPER-716.diff, BOOKKEEPER-716_715.diff
>
>
> it would be better to pad journal writes to align sector size, which to avoid 
> second syncing corrupt an already synced sector/page.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to