Giter Site home page Giter Site logo

Comments (6)

Connor1996 avatar Connor1996 commented on June 27, 2024

Thanks for your feedback. Do you have any suggestion to fix it?

from tinykv.

woodgear avatar woodgear commented on June 27, 2024

use another dir to avoid tmpfs. for example current_dir/tmp

from tinykv.

rapiz1 avatar rapiz1 commented on June 27, 2024

I think this is a critical issue since most Linux distros mount /tmp on tmpfs (systemd feature).
And it took me 2 hours to locate the problem which was in the test, not in my code. It was really an unpleasant experience. At least there should be a caveat in the doc.

from tinykv.

Connor1996 avatar Connor1996 commented on June 27, 2024

@rapiz1 Would you mind sending a fix, change the dir or add a caveat warning in the doc.

from tinykv.

wangnengjie avatar wangnengjie commented on June 27, 2024
func (c *Cluster) Start() {
	......
+	_ = os.RemoveAll("./tmp")
+	_ = os.Mkdir("./tmp", 0755|os.ModeDir)
	for storeID := uint64(1); storeID <= uint64(c.count); storeID++ {
-		dbPath, err := ioutil.TempDir("", "test-raftstore")
+		dbPath, err := ioutil.TempDir("./tmp", "test-raftstore")
	......

maybe somewhat like this? Or add mkdir&rm in Makefile.
RemoveAll can be ignored. But when the test failed, the dir will be huge as clients do not call MustDelete.

from tinykv.

rapiz1 avatar rapiz1 commented on June 27, 2024

What's the point of using directio here? I think performance and consistency across crash is not an issue since it's just a tutorial project. So we can just simply replace all directio.OpenFile with os.OpenFile and just drop directio out of badger. It works on Arch and it should work everywhere. @Connor1996

from tinykv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.