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

Stefan Miklosovic edited comment on CASSANDRA-17948 at 10/12/22 2:33 PM:
-------------------------------------------------------------------------

I am looking of a reviewer ([~brandon.williams]  [~jmckenzie] )

[https://github.com/apache/cassandra/pull/1900]

Logs are written via appenders before virtual tables are registered so that 
means that we would not capture all the logs in vtables after a node is 
started. I have covered this case as well, it will be visible in the PR.

Also, it is not desirable to have multiple appenders of same class here as we 
would have entries in vtable multiple times (from each appender). Hence, on 
startup, I am checking that there is one vtable appender present at most and I 
fail the start if there are many.

I am not completely sure about the size of the virtual table, I did it in such 
a way that it can not hold less than 1000 rows, it can not hold more than 1 
million rows and if no value is set via system property, it will default to 100 
000. I am open to change these values if you find other to be more appropriate.

debug.log I have on disk with 725 lines has about 194Kb. So 100k lines will 
have around 25Mb. I think having 1M is too much here. I am happy to cap it to 
100k at most with default of 50k.

I have also abandoned CircularFifoBuffer class and I tried to model the same 
approach with simple LinkedList. The disadvantage of CircularFifoBuffer is that 
it will allocate an array in constructor of given size so if we are supposed to 
have 100k rows it will allocate an array of length 100k, not good.


was (Author: smiklosovic):
I am looking of a reviewer ([~brandon.williams]  [~jmckenzie] )

[https://github.com/apache/cassandra/pull/1900]

Logs are written via appenders before virtual tables are registered so that 
means that we would not capture all the logs in vtables after a node is 
started. I have covered this case as well, it will be visible in the PR.

Also, it is not desirable to have multiple appenders of same class here as we 
would have entries in vtable multiple times (from each appender). Hence, on 
startup, I am checking that there is one vtable appender present at most and I 
fail the start if there are many.

I am not completely sure about the size of the virtual table, I did it in such 
a way that it can not hold less than 1000 rows, it can not hold more than 1 
million rows and if no value is set via system property, it will default to 100 
000. I am open to change these values if you find other to be more appropriate.

debug.log I have on disk with 725 lines has about 194Kb. So 100k lines will 
have around 25Mb. I think having 1M is too much here. I am happy to cap it to 
100k at most with default of 50k.

I have also abandoned CircularFifoBuffer class and I tried to model the same 
think with simple LinkedList. The disadvantage of CircularFifoBuffer is that it 
will allocate an array in constructor of given size so if we are supposed to 
have 100k rows it will allocate an array of length 100k, not good.

> Get warning and errors through virtual tables
> ---------------------------------------------
>
>                 Key: CASSANDRA-17948
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17948
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Feature/Virtual Tables
>            Reporter: Michiel Saelen
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.x
>
>         Attachments: signature.asc
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The warnings and errors are currently only accessible through Cassandra logs. 
> Automating the monitoring of the nodes would be much easier/secure if we can 
> make use of virtual tables to get the logs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to