Coder Social home page Coder Social logo

Comments (3)

slfritchie avatar slfritchie commented on August 17, 2024

As @evanmcc pointed out in another forum, these files are cleaned out when the bitcask is reopened (e.g. on Riak restart), but their presence can slow down merge calculations if there are lots of them relative to non-empty casks.

from bitcask.

evanmcc avatar evanmcc commented on August 17, 2024

I think the major expense here is actually in bitcask_fileops:create_file/2, and also perhaps fold and merge opens, since it'll list the entire directory when it tries to increment the counter and/or when it tries to get a fileset for the merge. I've added some logging to try and come to grips with the race, maybe I'll have some ideas soon.

from bitcask.

evanmcc avatar evanmcc commented on August 17, 2024

NB. that you need to do -size 18c to see empty hintfiles.

What looks to me to be happening here is that this pathological case creates only live keys in a 1 or 2 data files at a time, so your merge set gets queued, and then not a single key in them is put into a data file because all of them have been overwritten.

I am not sure that there is a FD leak here. I am not certain how often this case would happen to customers, but I think that it's worth handling to at least make fixes for issues like #114 easier to test (PR incoming tomorrow or tuesday, BTW). My initial idea would just be to lazily create the write file on the first write, then if we never write we never create the file.

from bitcask.

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.