• Igor Canadi's avatar
    Speed up FindObsoleteFiles · 1510339e
    Igor Canadi authored
    Here's one solution we discussed on speeding up FindObsoleteFiles. Keep a set of all files in DBImpl and update the set every time we create a file. I probably missed few other spots where we create a file.
    It might speed things up a bit, but makes code uglier. I don't really like it.
    Much better approach would be to abstract all file handling to a separate class. Think of it as layer between DBImpl and Env. Having a separate class deal with file namings and deletion would benefit both code cleanliness (especially with huge DBImpl) and speed things up. It will take a huge effort to do this, though.
    Let's discuss offline today.
    Test Plan: Ran ./db_stress, verified that files are getting deleted
    Reviewers: dhruba, haobo, kailiu, emayanke
    Reviewed By: dhruba
    Differential Revision: https://reviews.facebook.net/D13827