hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12079) Make 'X-Newest' header a configurable
Date Fri, 13 May 2016 09:42:12 GMT

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

Steve Loughran commented on HADOOP-12079:
-----------------------------------------

couple of comments here

# can a lower case option go in, the way all other hadoop options are. using "." as the separator.?
Simply {{.newest}} should suffice, as the X-bit is an implementation detail users don't need
to worry about
# needs a test to verify reads work with the flag==false. Presumably a test which recognises
that things *may* be inconsistent and slow spin. I recommend something which does a write,
an initial read, then an overwrite with a larger file then + new open and read at an offset
beyond the EOF of the original file. That's essentially where I saw inconsistencies in the
past

> Make 'X-Newest' header a configurable
> -------------------------------------
>
>                 Key: HADOOP-12079
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12079
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/swift
>    Affects Versions: 2.6.0, 3.0.0-alpha1
>            Reporter: Gil Vernik
>            Assignee: Gil Vernik
>         Attachments: x-newest-optional0001.patch, x-newest-optional0002.patch, x-newest-optional0003.patch,
x-newest-optional0004.patch, x-newest-optional0005.patch
>
>
> Current code always sends X-Newest header to Swift. While it's true that Swift is eventual
consistent and X-Newest will always get the newest version from Swift, in practice this header
will make Swift response very slow. 
> This header should be configured as an optional, so that it will be possible to access
Swift without this header and get much better performance. 
> This patch doesn't modify current behavior. All is working as is, but there is an option
to provide fs.swift.service.useXNewest = false. 
> Some background on Swift and X-Newest: 
> When a GET or HEAD request is made to an object, the default behavior is to get the data
from one of the replicas (could be any of them). The downside to this is that if there are
older versions of the object (due to eventual consistency) it is possible to get an older
version of the object. The upside is that the for the majority of use cases, this isn't an
issue. For the small subset of use cases that need to make sure that they get the latest version
of the object, they can set the "X-Newest" header to "True". If this is set, the proxy server
will check all replicas of the object and only return the newest object. The downside to this
is that the request can take longer, since it has to contact all the replicas. It is also
more expensive for the backend, so only recommended when it is absolutely needed.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message