mirror of https://github.com/apache/cassandra
Handling partially written hint files
Patch by Garvit Juniwal; Reviewed by Aleksey Yeschenko for CASSANDRA-12728
This commit is contained in:
parent
71d4f66d72
commit
3110d27dde
|
|
@ -1,5 +1,5 @@
|
|||
3.0.14
|
||||
*
|
||||
* Handling partially written hint files (CASSANDRA-12728)
|
||||
|
||||
3.0.13
|
||||
* Make reading of range tombstones more reliable (CASSANDRA-12811)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
package org.apache.cassandra.hints;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
@ -188,6 +189,11 @@ class HintsReader implements AutoCloseable, Iterable<HintsReader.Page>
|
|||
{
|
||||
hint = computeNextInternal();
|
||||
}
|
||||
catch (EOFException e)
|
||||
{
|
||||
logger.warn("Unexpected EOF replaying hints ({}), likely due to unflushed hint file on shutdown; continuing", descriptor.fileName(), e);
|
||||
return endOfData();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new FSReadError(e, file);
|
||||
|
|
@ -280,6 +286,11 @@ class HintsReader implements AutoCloseable, Iterable<HintsReader.Page>
|
|||
{
|
||||
buffer = computeNextInternal();
|
||||
}
|
||||
catch (EOFException e)
|
||||
{
|
||||
logger.warn("Unexpected EOF replaying hints ({}), likely due to unflushed hint file on shutdown; continuing", descriptor.fileName(), e);
|
||||
return endOfData();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new FSReadError(e, file);
|
||||
|
|
|
|||
Loading…
Reference in New Issue