couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Shorin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2134) Filter log by date range
Date Sun, 20 Apr 2014 19:11:15 GMT

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

Alexander Shorin commented on COUCHDB-2134:
-------------------------------------------

The problem of this feature that there is no API to query {{/_log}} for specific datetime
value: only by using bytes range via {{offset=}} and {{bytes=}} params. And implementation
of datetime search based on them would be merely equal full file scan and quite heavy IO operation
(logs could contains GBs of data and there may not be the range that you're searching).

So technically this feature has only one way to be implemented: filter only the data that
was fetched by Fauxton. This would be fast, optimal, possible to do right now and fit the
"poorman" style ({{/_log}} is poorman's tail as we know).

What's the use case of this feature then? Probably, the "date" filter isn't good name for
it: to filter by date you have to keep the tab with logs open for few days and there is no
browser that wouldn't eat all the memory due to huge amount of data that he have to keep.
The "time" filter is more better reflect the reality of possible usage. This filter better
to be smart to set automatically start/end range based on timestamps of received data. Say
you open tab at 12:34, so the range start is limited by this value and the range end is limited
by current time - this should remove confusion about believing that this filter is able to
be applied upon whole couch.log file's content.

As for real and effective filter for {{/_log}} by datetime range the log data should be indexed
proper and the {{_log}} database looks as good solution for that - good feature for future
releases. As for today, if you need to dig into some issue in the past you'll have to connect
by ssh to your server and use unbeatable good old linux cli tools to parse the data from couch.log
file.

> Filter log by date range
> ------------------------
>
>                 Key: COUCHDB-2134
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2134
>             Project: CouchDB
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Alexander Shorin
>            Assignee: Robert Kowalski
>
> That's the common use case for working with logs to determine: wtf that was around 6
o'clock?!
> Sure, that could be nontrivial with current log API, but that is exactly those filter
which user is expected to use on this page.



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

Mime
View raw message