[
https://issues.apache.org/jira/browse/CASSANDRA-15404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971149#comment-16971149
]
maxwellguo commented on CASSANDRA-15404:
----------------------------------------
[~ifesdjeen] you are right , Hints data is not as important as regular data ,
but now they share the same disk failure policy .
For some case that hint and regular data reside on same disk . When disk
occures a file error, Hint's filesystem error may represent that regular data
file system got some errors. But for my test above, I just remove the hint's
directory and an error occurs. But my filesystem is ok, regular data can be
read too,I delete hints directory mannual that casue cassandra process's
shutdown.
{code:java}
void fsyncDirectory()
{
int fd =
NativeLibrary.tryOpenDirectory(hintsDirectory.getAbsolutePath());
if (fd != -1)
{
try
{
SyncUtil.trySync(fd);
NativeLibrary.tryCloseFD(fd);
}
catch (FSError e) // trySync failed
{
logger.error("Unable to sync directory {}",
hintsDirectory.getAbsolutePath(), e);
FileUtils.handleFSErrorAndPropagate(e);
}
}
else
{
logger.error("Unable to open directory {}",
hintsDirectory.getAbsolutePath());
FileUtils.handleFSErrorAndPropagate(new FSWriteError(new
IOException(String.format("Unable to open hint directory %s",
hintsDirectory.getAbsolutePath())), hintsDirectory.getAbsolutePath()));
}
}
{code}
fd is not -1 ,and for hints share the same failure policy of die .For hint data
is not important as regular, so I think hint shoud use a different policy with
a different configuration.
For other case hints and regular data reside on different , Hint failure policy
may affect the process.
So I think we should supply a configuration for hints disk policy not as strict
as data disk for they are not as important as regulary data .Hints disk policy
should not be the same as data disk .
> Hint directory error affect cassandra process
> -----------------------------------------------
>
> Key: CASSANDRA-15404
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15404
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Config, Local/Other
> Reporter: maxwellguo
> Assignee: maxwellguo
> Priority: Normal
> Fix For: 4.x
>
> Attachments: image.png, log.png
>
>
> I use the default config to do some test. I delete all hint directory by
> mistake,but my cassandra process at last stoped .Latter I found that that is
> because the hint directory use the data disk policy .
> In our production cluster , hint and cache's dir are set separately and are
> not the same with data dir . And we know that cassandra can use multi data
> directory to store data, the hint's data operation should not affect the data
> and commitlog 's read or write . Also
> hint/cache 's data loss do not affect the cassandra's correct read .
> so I think hint's disk_faily_policy should be separately. So we can got three
> type of
> disk faily policy for : data disk , commitlog disk and hint disk 。
> I don't know if my suggestion is meaningful. If it is, I would like to take
> over the issue。I'm also happy to receive new suggestions.
> I thinks this is a bug , but now I can not modify the Type of the issue .
> The situation is easy to reproduce .The data disk policy use stop . every
> time you delete the hint directory will cause the daemon's stop.Stop
> NativeTransport server and gossip .
> !log.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]