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

Per Otterström commented on CASSANDRA-15076:
--------------------------------------------

Thanks for having a look on this patch.
{quote}It might be better to log warnings for those specific records (if 
needed) and move on with processing rather than aborting the viewer.
{quote}
If an incompatible record version/type appears in the queue, aren't chances 
quite high that the rest of the records in the queue will be incompatible as 
well?

One option could be to add a new flag {{-i, --ignore}}. When used, the 
auditlogviewer tool would silently skip unexpected records, try to recover and 
continue on next record. That way users could at least try to read out records 
from the queue even when some unexpected records are present. What do you think?
{quote}Would {{int16}} be the right choice for version? Can we be aggressive to 
{{int8}}?
{quote}
Yeah, {{int8}} would probably last us quite some time. However, I'd prefer it 
if we stick to {{int16}} since I've already released versions of 
[ecAudit|https://github.com/Ericsson/ecaudit] where proposed record header 
format is used. It would simplify a lot for ecAudit users as they migrate to 
Cassandra 4.0.

On the topic of saving disk space and improving efficiency - we ran some tests 
with shorter field-names, or even fieldless queues. That makes a [significant 
difference|https://github.com/Ericsson/ecaudit/issues/115#issuecomment-537950722].
 But that's probably for another ticket.

Will rebase and re-test once we agree on details above.

> Align record header of FQL and audit binary log
> -----------------------------------------------
>
>                 Key: CASSANDRA-15076
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15076
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Tools, Tool/fql
>            Reporter: Per Otterström
>            Assignee: Per Otterström
>            Priority: Normal
>             Fix For: 4.0
>
>
> The new full query logger and the audit logger support logging into binary 
> Chronicle logs. Both create records with a small header to indicate what 
> follows, but the two features have adopted different header formats. Let's 
> align the record header format with this ticket.
>  * Both features should use the same header layout. This makes it possible to 
> give more user friendly error messages in the {{fqltool}} and 
> {{auditlogviewr}} commands.
>  * The record header should have a distinct {{type}} to indicate the type of 
> record.
>  * The record header should have a {{version}} so that the record format can 
> evolve.
> Current record header format of the FQL is:
> {noformat}
> version:0(int16)
> type:<type>(text)
> {noformat}
> where {{<type>}} can be either {{batch}} or {{single-query}}.
> Current record header format of the binary audit log is:
> {noformat}
> type:AuditLog(text)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to