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

日志问题 #35

Closed
life191919 opened this issue Sep 28, 2016 · 6 comments
Closed

日志问题 #35

life191919 opened this issue Sep 28, 2016 · 6 comments

Comments

@life191919
Copy link

write2file这个日志文件主要用途是做什么的,如果太多了,可不可以直接手动删除?还有就是使用默认配置最大数量10个的时候,感觉没起作用,日志文件数量一直在增加

@KernelMaker
Copy link
Collaborator

这个是主从同步的binlog,不用手动删除,pika会根据配置自动删除,如果自动删除失效,可以检查一下该节点是否有挂slave,可能由于slave占的同步点比较靠前导致前面的文件都没法自动删除

@life191919
Copy link
Author

怎么看slave的同步点

@life191919
Copy link
Author

如果手动删除了,会有什么影响,主从同步会失效吗?还需要重新做一次主从吗?

@CatKang
Copy link
Contributor

CatKang commented Sep 28, 2016

不可以手动删除,如果是主可能导致已有的同步线程同步失败

@life191919
Copy link
Author

同步失败后还能恢复吗?还是说只能重新再创建一台从了?
还有就是如何查看slave的同步点?以及如果同步点比较靠前导致前面的文件都没法自动删除的情况如何处理?

@CatKang
Copy link
Contributor

CatKang commented Sep 29, 2016

1,如果由于手动删除了主的binlog导致同步失败,可以将主上之前的binlog全部都删除,所有的从重新salveof no, slaveof 来重新建立主从关系
2,在slave上执行info命令,其中binlog_offset看到的就是当前的同步点
3,正常情况下slave会在同步过程中不断的后移自己的同步点,从而master这边就可以删除较老的文件。如果一直有slave占用较早的同步点,可能是slave有异常情况发生。如果真的发生了,我们再依情况讨论吧

AlexStocks pushed a commit to ipixiu/pika that referenced this issue Dec 21, 2018
* fix memory leak

* remove not necessary locks & code format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants