[
https://issues.apache.org/jira/browse/CASSANDRA-16335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17295339#comment-17295339
]
Stefan Miklosovic commented on CASSANDRA-16335:
-----------------------------------------------
I was not able to reproduce the first failure (TTL test).
The fix related to timout consists of moving the test method above the last
test method in ColumnFamilyStoreTest file. It seems to me that the method
'testScrubDataDirectories' does this 'ssTable.selfRef().release();' and when my
method is executed after it, it is spinning endlessly on this hence it timeouts:
WARN [main] 2021-03-04 16:23:54,306 NoSpamLogger.java:95 - Spinning trying to
capture readers
[BigTableReader(path='/home/smiklosovic/dev/cassandra/cassandra-instaclustr/cassandra/build/test/cassandra/data/ColumnFamilyStoreTest1/Standard1-9ed4fa207cfd11eb85670f4f85d7ff30/na-7-big-Data.db')],
released:
[BigTableReader(path='/home/smiklosovic/dev/cassandra/cassandra-instaclustr/cassandra/build/test/cassandra/data/ColumnFamilyStoreTest1/Standard1-9ed4fa207cfd11eb85670f4f85d7ff30/na-7-big-Data.db')],
Mere moving of that method just works. What is interesting that I tried to
create completely new keyspace / table but it was still trying to open the
other keyspace. Maybe that is somehow caused by that releasing ...
> Expose data dirs in ColumnFamilyStoreMBean
> -------------------------------------------
>
> Key: CASSANDRA-16335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16335
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Low
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As of now, I am not currently aware of any way how to get the information
> where a CF stores its data. While this might look like a detail, it is
> important for backup and restore purposes. Lets consider this workflow:
> 1) There is a keyspace "abc" with table "def", on disk, it will look like
> /my/data/abc/def-123445/...
> 2) I take a backup, all SSTables are put somewhere under path
> /backups/abc/def-12345/....
> 3) I delete this table by CQL, data ends up in "dropped"
> 4) I create this table again, but now it will generate other ID - like
> /my/data/abc/def-6789/...
> 5) I want to restore /backups/abc/def-123445/... but right now there are two
> structures -
> {code:java}
> ├── data
> │ ├── abc
> │ │ ├── def-12345...
> │ │ │ ├── backups
> │ │ │ └── snapshots
> │ │ │ └── dropped-1607699318139-ghi
> │ │ │ ├── manifest.json
> │ │ │ ├── na-1-big-CompressionInfo.db
> │ │ │ ├── na-1-big-Data.db
> │ │ │ ├── na-1-big-Digest.crc32
> │ │ │ ├── na-1-big-Filter.db
> │ │ │ ├── na-1-big-Index.db
> │ │ │ ├── na-1-big-Statistics.db
> │ │ │ ├── na-1-big-Summary.db
> │ │ │ ├── na-1-big-TOC.txt
> │ │ │ └── schema.cql
> │ │ └── def-6789...
> │ │ ├── backups
> │ │ ├── na-1-big-CompressionInfo.db
> │ │ ├── na-1-big-Data.db
> │ │ ├── na-1-big-Digest.crc32
> │ │ ├── na-1-big-Filter.db
> │ │ ├── na-1-big-Index.db
> │ │ ├── na-1-big-Statistics.db
> │ │ ├── na-1-big-Summary.db
> │ │ └── na-1-big-TOC.txt
> {code}
> The question now is, what directory I should restore this to? Sure, into the
> "active" one, but I can not possibly know which one it is, because one of
> them is not used anymore and I do not want to do something very smelly like
> listing directories on disk and checking which one does not contain "dropped"
> directory ... Yes, one might use importing of SSTables - that is introduced
> in Cassandra 4, but for Cassandra 3, one can either copy it over or do
> hardlinks and refresh.
> The second scenario is like this:
> There is just one "active" table, no structure with "dropped" dir exists, but
> its id (that part after table name) differs. If I want to copy files over and
> refresh, I need to resolve this discrepancy and copy SSTables into a
> directory ending on id which differs from id from backup.
> I was trying to get this information from CFSMB but that information is not
> exposed.
> Is there any way how to retrieve via JMX where a table actually stores its
> data?
> I have put this together: https://github.com/apache/cassandra/pull/850/files
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]