You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2016/08/16 23:14:21 UTC
[jira] [Updated] (TS-3768) Implement a tiered back-off in
read-while-writer retries
[ https://issues.apache.org/jira/browse/TS-3768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Call updated TS-3768:
---------------------------
Summary: Implement a tiered back-off in read-while-writer retries (was: Implement a tiered back-off in read-while-writer retries.)
> Implement a tiered back-off in read-while-writer retries
> --------------------------------------------------------
>
> Key: TS-3768
> URL: https://issues.apache.org/jira/browse/TS-3768
> Project: Traffic Server
> Issue Type: Bug
> Components: Cache
> Reporter: Sudheer Vinukonda
> Fix For: sometime
>
>
> There's some code in the current cache layer that attempts to do a tiered back off in reattempting read-while-writer (either for acquiring writer lock or waiting for the first fragment download etc), but, that code is buggy (see below).
> https://github.com/apache/trafficserver/blob/master/iocore/cache/P_CacheInternal.h#L100
> {code}
> #define VC_SCHED_WRITER_RETRY() \
> do { \
> ink_assert(!trigger); \
> writer_lock_retry++; \
> ink_hrtime _t = WRITER_RETRY_DELAY; \
> if (writer_lock_retry > 2) \
> _t = WRITER_RETRY_DELAY * 2; \
> else if (writer_lock_retry > 5) \
> _t = WRITER_RETRY_DELAY * 10; \
> else if (writer_lock_retry > 10) \
> _t = WRITER_RETRY_DELAY * 100; \
> trigger = mutex->thread_holding->schedule_in_local(this, _t); \
> return EVENT_CONT; \
> } while (0)
> {code}
> Presently, the retry happens as follows:
> {{WRITER_RETRY_DELAY, WRITER_RETRY_DELAY, 2*WRITER_RETRY_DELAY, 2*WRITER_RETRY_DELAY, 2*WRITER_RETRY_DELAY etc}}
> I'm removing the buggy code with TS-3767 to avoid confusion, but, opening this jira per [~zwoop]'s suggestion to implement a proper tiered back off in the future.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)