You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yunkai Zhang (JIRA)" <ji...@apache.org> on 2013/09/29 12:47:23 UTC
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781335#comment-13781335 ]
Yunkai Zhang commented on TS-2259:
----------------------------------
We had discussed this feature in email:
==James Peach==
Hi Yunkai,
We have been asked to look at ATS log host failover, so I started reading the logging source code. It looks to me that I could easily modify LogHostList::preproc_and_try_delete() to just write to the first available log host. After that, I could add more advanced logic to keep the current host if a failed log host came back to life ....
Do you think that this is a reasonable approach?
==Yunkai Zhang==
"just write to the first available log host" seems will break something -- user may want to write the log to multiple log hosts at the same time.
Maybe we can add *m_next_failover_host* member into LogHost:
class LogHost {
...
LogHost *m_next_failover_host;
...
};
And then, in LogHostList::preproc_and_try_delete(), make the for-loop looks like:
for (LogHost * host = first(); host && nr; host = next(host)) {
int ret = host->preproc_and_try_delete(lb);
while (ret == FAILOVER) {
LogHost *failover_host = host->m_next_failover_host;
if (failover_host == NULL) //Fail to failover
break;
ret = failover_host->preproc_and_try_delete(lb);
}
nr--;
}
FYI:)
==Yongming Zhao==
I'd like the idea of adding a failover log host option, that will be a good enhancement.
+1
> Introduce failover for logging system
> -------------------------------------
>
> Key: TS-2259
> URL: https://issues.apache.org/jira/browse/TS-2259
> Project: Traffic Server
> Issue Type: New Feature
> Components: Logging
> Reporter: Yunkai Zhang
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)