Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BREAKING: standard projections are not indexing system streams anymore

  • Loading branch information...
commit 91ce7182738d12d48d4740fc4b14bfe0207689d3 1 parent be64d6a
@ysw ysw authored
View
2  ...tore/EventStore.Projections.Core.Tests/Integration/system_projections/when_running_system_projections.cs
@@ -86,7 +86,7 @@ public void streams_are_indexed()
{
AssertStreamContains(
"$streams", "0@account-01", "0@account-02", "0@stream", "0@test-1", "0@test-2", "0@stream-1",
- "0@$streams", "0@account-000-02");
+ "0@account-000-02");
}
[Test]
View
8 ...ore/EventStore.Projections.Core.Tests/Services/projections_manager/continuous/a_new_posted_projection.cs
@@ -32,6 +32,7 @@
using EventStore.Core.Data;
using EventStore.Core.Messages;
using EventStore.Core.Messaging;
+using EventStore.Core.Services;
using EventStore.Projections.Core.Messages;
using EventStore.Projections.Core.Services;
using EventStore.Projections.Core.Services.Management;
@@ -111,6 +112,7 @@ protected override void Given()
{
base.Given();
EnableReadAll();
+ ExistingEvent("temp1", "test1", "{}", "{}");
}
protected override IEnumerable<WhenStep> When()
@@ -131,8 +133,10 @@ public void returns_correct_state()
Assert.AreEqual(
"{\"data\": 1}", _consumer.HandledMessages.OfType<ProjectionManagementMessage.ProjectionState>().Single().State);
Assert.AreEqual(
- _all.Last().Key,
- _consumer.HandledMessages.OfType<ProjectionManagementMessage.ProjectionState>().Single().Position.Position);
+ _all.Last(v => !SystemStreams.IsSystemStream(v.Value.EventStreamId)).Key,
+ _consumer.HandledMessages.OfType<ProjectionManagementMessage.ProjectionState>()
+ .Single()
+ .Position.Position);
}
}
View
2  src/EventStore/EventStore.Projections.Core/Projections.cs
@@ -82,7 +82,7 @@ public void Stop()
sealed class Projections
{
- public const int VERSION = 2;
+ public const int VERSION = 3;
private List<QueuedHandler> _coreQueues;
private readonly int _projectionWorkerThreadCount;
View
4 src/EventStore/EventStore.Projections.Core/Services/Processing/EventByTypeIndexEventFilter.cs
@@ -28,6 +28,7 @@
using System.Collections.Generic;
using System.Linq;
+using EventStore.Core.Services;
namespace EventStore.Projections.Core.Services.Processing
{
@@ -54,7 +55,8 @@ public override bool DeletedNotificationPasses(string positionStreamId)
public override bool PassesSource(bool resolvedFromLinkTo, string positionStreamId, string eventType)
{
//TODO: add tests to assure that resolved by link events are not passed twice into the subscription?!!
- return !resolvedFromLinkTo || _streams.Contains(positionStreamId);
+ return !(resolvedFromLinkTo && !SystemStreams.IsSystemStream(positionStreamId))
+ || _streams.Contains(positionStreamId);
}
public override string GetCategory(string positionStreamId)
View
6 src/EventStore/EventStore.Projections.Core/Services/Processing/TransactionFileEventFilter.cs
@@ -27,6 +27,7 @@
//
using System.Collections.Generic;
+using EventStore.Core.Services;
namespace EventStore.Projections.Core.Services.Processing
{
@@ -47,7 +48,10 @@ public override bool DeletedNotificationPasses(string positionStreamId)
public override bool PassesSource(bool resolvedFromLinkTo, string positionStreamId, string eventType)
{
- return _includeLinks || !resolvedFromLinkTo;
+ return (_includeLinks || !resolvedFromLinkTo)
+ && (!SystemStreams.IsSystemStream(positionStreamId)
+ || SystemStreams.IsMetastream(positionStreamId)
+ && !SystemStreams.IsSystemStream(SystemStreams.OriginalStreamOf(positionStreamId)));
}
public override string GetCategory(string positionStreamId)
View
1  src/EventStore/EventStore.Projections.Core/Services/Processing/TransactionFileEventReader.cs
@@ -33,6 +33,7 @@
using EventStore.Core.Helpers;
using EventStore.Core.Messages;
using EventStore.Core.Messaging;
+using EventStore.Core.Services;
using EventStore.Core.Services.TimerService;
using EventStore.Projections.Core.Messages;
using EventStore.Projections.Core.Standard;
Please sign in to comment.
Something went wrong with that request. Please try again.