fix bugs on platform windows to pass all test case
This commit is contained in:
parent
b82b2d0c1b
commit
90de381cdb
14
chunks.go
14
chunks.go
|
@ -171,12 +171,7 @@ func (w *chunkWriter) finalizeTail() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := tf.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// close dir file (if not windows platform will fail on rename)
|
||||
return w.dirFile.Close()
|
||||
return tf.Close()
|
||||
}
|
||||
|
||||
func (w *chunkWriter) cut() error {
|
||||
|
@ -282,7 +277,12 @@ func (w *chunkWriter) seq() int {
|
|||
}
|
||||
|
||||
func (w *chunkWriter) Close() error {
|
||||
return w.finalizeTail()
|
||||
if err := w.finalizeTail(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// close dir file (if not windows platform will fail on rename)
|
||||
return w.dirFile.Close()
|
||||
}
|
||||
|
||||
// ChunkReader provides reading access of serialized time series data.
|
||||
|
|
Loading…
Reference in New Issue