jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-3703) Improve handling of IOException
Date Tue, 01 Dec 2015 11:24:11 GMT

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

Michael Dürig commented on OAK-3703:
------------------------------------

I experimented with two approached to this driven by the desire to make usage of {{IOException}}
in {{SegmentWriter}} consistent:

# throw {{IOException}} from all write methods: https://github.com/mduerig/jackrabbit-oak/commit/b991d10885dbd48d0185f16034d668808ad37463
# don't throw {{IOException}} from any of the write methods but throw an {{ISE}} with the
{{IOException}} as its cause from where the actual IO error occured: https://github.com/mduerig/jackrabbit-oak/commit/2cd3d401a46ea4a217e353cedccdf15058dbf0b2

Given we use the 1st approach re. these nasty checked exception in the rest of Oak's code
base I'd prefer that one. 

[~alex.parvulescu] WDYT

> Improve handling of IOException
> -------------------------------
>
>                 Key: OAK-3703
>                 URL: https://issues.apache.org/jira/browse/OAK-3703
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segmentmk
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: resilience, technical_debt
>
> {{SegmentStore.writeSegment}} doesn't specify its behaviour in the face of IO errors.
Moreover {{FileStore.writeSegment}} just catches any {{IOException}} and throws a {{RuntimeException}}
with the former as its cause. 
> I think we need to clarify this as an immediate cause of the current state is that some
of the {{SegmentWriter}} write methods *do* throw an {{IOException}} and some *don't*. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message