Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't read a tsfile when it is written more than once #101

Open
LeiRui opened this issue Dec 5, 2017 · 3 comments
Open

can't read a tsfile when it is written more than once #101

LeiRui opened this issue Dec 5, 2017 · 3 comments
Labels

Comments

@LeiRui
Copy link
Contributor

LeiRui commented Dec 5, 2017

happened to write a tsfile twice and couldn't read it consequently

@MyXOF
Copy link
Contributor

MyXOF commented Dec 5, 2017

请给出出错的代码示例和具体报错输出

@LeiRui
Copy link
Contributor Author

LeiRui commented Dec 5, 2017

读/写代码拷贝自wiki
写同一个文件两次之后再读报错如下:
image

@jixuan1989 jixuan1989 added the bug label Dec 15, 2017
@Block2
Copy link

Block2 commented Apr 9, 2018

问题1:遇到同样的情况,写一个文件后调用tsFile.close();再往tsfile里面写数据,再tsFile.close();的时候会报错。我解决该报错的方法是在用tsFile的时候将输出流seek到file的末尾;

1

在写入两次之后进行query操作,(跟踪代码后发现,对于写操作tsFile.close()的时候会往tsFile文件里面写入fileMetaData序列化数据。)发现只会读取最后一个fileMetaData。导致前几次写入的文件内容无法查询到,只能查询到最后一次写操作的close()前的结果。
问题2:
在查询的同时对应的TsFile的status不能为write,导致不能读写不能够同步。写的过程中(未执行tsFile.close()操作前)无法读。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants