NEventStore / NEventStore.Persistence.MongoDB

Mongo Persistence Engine for NEventStore
MIT License
22 stars 26 forks source link

Fix Purge(bucketId) to empty commits #28

Closed devup-sam closed 8 years ago

devup-sam commented 8 years ago

Purge was using "_id.BucketId" for all the queries. Required format for Commits is just "BucketId", so no documents are removed from Commits on bucket specific Purge

The change was made by using git online fork and edit, I guess that's why it's marked everything as being changed.

The change was PersistedCommits.Remove(Query.EQ(MongoStreamHeadFields.FullQualifiedBucketId, bucketId)); to PersistedCommits.Remove(Query.EQ(MongoCommitFields.BucketId, bucketId));

devup-sam commented 8 years ago

Any progress? Is there anything I can do?

alkampfergit commented 8 years ago

Sorry for late response I was pretty busy these days. The error is due to wrong nuspec file used to create nuget packages. I've pushed a fix and now I'm waiting for the build server to rebuild the pull request.

alkampfergit commented 8 years ago

Now the merge is ok, just a simple note, I've noticed from the commits page https://github.com/NEventStore/NEventStore.Persistence.MongoDB/commit/44c6bbaee61a7f585816a0ace6f37d6e1a4a4de6 that probably we got some problem of line feed, because it seems that everything is removed and then re-added, could you please check?

Thanks a lot.

devup-sam commented 8 years ago

Awesome, thanks for fixing it! I noticed that too - see my first comment. What's the best way to proceed do you think?

alkampfergit commented 8 years ago

The problem was probably originated by how AutoCrLf is configured in Git. Andrea that is the guy that wrote the MongoDb is actually on vacation until Sunday, I've opened an hotfix with your change, since it is a single line, it is probably faster than change your original pull request :).

Please check the new hotfix branch https://github.com/NEventStore/NEventStore.Persistence.MongoDB/commit/f233bd3a2c708d34c0911d35d743f4dab84b982a if I correctly reported your single-line modification to that branch.

When @andreabalducci will return from vacation on monday he can confirm that the fix is ok and then we will close the hotfix merging to master and publishing the new package.

Thanks.

andreabalducci commented 8 years ago

merged on 5.3.2