cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8572) CQLSSTableWriter shouldn't trigger the start of the commit log
Date Wed, 07 Jan 2015 13:55:34 GMT


Sylvain Lebresne commented on CASSANDRA-8572:

I've edited the title to reflect what the actual problem to solve is. Basically, CQLSSTableWriter
should ideally be usable as a very simple simple library without triggering any Cassandra
specific initialisation (including starting the commit log, but also loading the yaml file
for instance, both of which are the case today due to static initialisation mess).

What is the simplest way to solve that problem is is up for discussion though and making {{}}
not initialize the commit log may or may not be part of it (it could be that it's simpler
to make CQLSSTableWriter not call {{}} in the first place). Let's also not focus
just on the commit log: the fact that the you need to have a proper yaml in the classpath
to use CQLSSTableWriter is as much an important problem as the commit log issue.

> CQLSSTableWriter shouldn't trigger the start of the commit log
> --------------------------------------------------------------
>                 Key: CASSANDRA-8572
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benjamin Lerer
>            Priority: Minor
> Due to static dependencies, calling {{}} trigger the creation of the {{CommitLog}}
singleton which in turn trigger the start of all the threads used by the {{CommitLog}}.
> For simple client like {{CQLSSTableWriter}} that dependency is an issue as it can prevent
the JVM from shutting down if the CommitLog is not shutdown explicitly. 
> The following stacktrace show the initialization chain that trigger the {{CommitLog}}:
> {code}
> CommitLogSegmentManager.<init>() line: 173	
> CommitLog.<init>() line: 70	
> CommitLog.<clinit>() line: 55	
> Memtable.<init>(ColumnFamilyStore) line: 66	
> DataTracker.init() line: 378	
> DataTracker.<init>(ColumnFamilyStore) line: 54	
> ColumnFamilyStore.<init>(Keyspace, String, IPartitioner, int, CFMetaData, Directories,
boolean) line: 281	
> ColumnFamilyStore.createColumnFamilyStore(Keyspace, String, IPartitioner, CFMetaData,
boolean) line: 443	
> ColumnFamilyStore.createColumnFamilyStore(Keyspace, String, boolean) line: 414	
> Keyspace.initCf(UUID, String, boolean) line: 327	
> Keyspace.<init>(String, boolean) line: 280	
>, Schema, boolean) line: 122	
> {code}

This message was sent by Atlassian JIRA

View raw message