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

Sylvain Lebresne commented on CASSANDRA-6962:
---------------------------------------------

So, we did end up removing the ks and cf name from the sstable filename here 
right?

Because that breaks at least CQLSSTableWriter (or more precisely, 
AbstractSSTableSimpleWriter) because it doesn't force the sstable to be in a 
directory that is name after the KS and CF and breaks the code 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java#L66-L88]
 (more precisely the {{desc.cfname.equals(columnFamily)}} test fails because 
{{desc.cfname}} is wrong).

I suppose we could fix that code by removing the test in question as it 
wouldn't rally break that code, but I have to say that I'm rather uncomfortable 
with the fact that the filename has nothing identifying the table anymore. It 
feels way too easy to mistakenly copy sstable for different tables in the same 
directory and ending up overwriting stuffs we shouldn't. It also feels like we 
should have a way to find out the ks and table name without relying on where 
the sstable file is, as that's rather fragile imo. Maybe we should record this 
in the metadata or something.

> examine shortening path length post-5202
> ----------------------------------------
>
>                 Key: CASSANDRA-6962
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6962
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Brandon Williams
>            Assignee: Yuki Morishita
>             Fix For: 3.0
>
>         Attachments: 6962-2.1.txt, 6962-3.0.txt
>
>
> From CASSANDRA-5202 discussion:
> {quote}
> Did we give up on this?
> Could we clean up the redundancy a little by moving the ID into the directory 
> name? e.g., ks/cf-uuid/version-generation-component.db
> I'm worried about path length, which is limited on Windows.
> Edit: to give a specific example, for KS foo Table bar we now have
> /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/foo-bar-ka-1-Data.db
> I'm proposing
> /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/ka-1-Data.db
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to