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

Fix assertion regarding # of midpoints cached #1920

Merged
merged 1 commit into from Apr 30, 2019

Conversation

2 participants
@shaan1337
Copy link
Member

commented Apr 29, 2019

If this line is hit: https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/Index/PTableConstruction.cs#L514, no midpoints will be cached to the PTable file.

This will make the following assertion fail:

if (_version >= PTableVersions.IndexV4 && _count > 0 && _midpointsCached < 2)

Resolution
Check if there is at least one midpoint cached before applying the _midpointsCached < 2 assertion.

@jen20

jen20 approved these changes Apr 29, 2019

@shaan1337 shaan1337 merged commit 50a7af5 into master Apr 30, 2019

9 checks passed

EventStore.EventStore Build #20190429.2 succeeded
Details
EventStore.EventStore (Centos 7 x64 Debug) Centos 7 x64 Debug succeeded
Details
EventStore.EventStore (Centos 7 x64 Release) Centos 7 x64 Release succeeded
Details
EventStore.EventStore (Ubuntu 14.04 x64 Debug) Ubuntu 14.04 x64 Debug succeeded
Details
EventStore.EventStore (Ubuntu 14.04 x64 Release) Ubuntu 14.04 x64 Release succeeded
Details
EventStore.EventStore (Windows x64 Debug) Windows x64 Debug succeeded
Details
EventStore.EventStore (Windows x64 Release) Windows x64 Release succeeded
Details
EventStore.EventStore (macOS x64 Debug) macOS x64 Debug succeeded
Details
EventStore.EventStore (macOS x64 Release) macOS x64 Release succeeded
Details

@shaan1337 shaan1337 deleted the fix-ptable-midpoint-assertion branch Apr 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.