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

Race condition in TransactionLog() c'tor #5

Open
csharptest opened this issue Jan 29, 2015 · 1 comment
Open

Race condition in TransactionLog() c'tor #5

csharptest opened this issue Jan 29, 2015 · 1 comment
Assignees

Comments

@csharptest
Copy link
Owner

Issue:
Race condition in TransactionLog.cs, TransactionLog's c'tor, between the File.Exists(...) call and the new FileInfo(_options.FileName).Length statement. A file can be deleted in between leading to an exception later.

What steps will reproduce the problem?

  1. Set V2 options with "CreateFile = CreatePolicy.Always"
  2. Add via something like (note the using usage)
public void Add(MyEntity newItem)
{            
    // Open the BPlusTree using these options
    using (var bpt = new BPlusTree<string, KeyEntity>(_options))
    {
        bpt.Add(newItem.key, newItem.Value);
    }
 }
  1. Add about 100K entities in rapid fire via the Add(MyEntity newItem) call.

There is a 1% error chance (on a high performance SSD) so by the 100th of so addition, you'll hit the race condition.

What is the expected output? What do you see instead?

  • See above

What version of the product are you using? On what operating system?

  • Tip of HG repo

Please provide any additional information below.

  • Not specific to this issue but at a project level, it would be nice if you had a forum or something where user's of this library could talk about uses/features/bugs. For example: A cool idea would be extending the storage to use Azure Blob Storage (in Page mode). Likely extending/replicating off the BTreeFileStoreV2 class. A forum could facilitate this sort of a discussion. Or perhaps having a multi master write model (extending on that azure thought).
@csharptest csharptest self-assigned this Jan 29, 2015
@csharptest
Copy link
Owner Author

Fixed on /dev

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

1 participant