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

System.NullReferenceException for $all subscription filtering by StreamID prefix #4177

Open
m-guesnon-pvotal opened this issue Feb 29, 2024 · 3 comments
Labels

Comments

@m-guesnon-pvotal
Copy link

m-guesnon-pvotal commented Feb 29, 2024

Describe the bug
When using a subscribeToAll type persistent subscription with server-side filtering based on StreamID prefixes, server gets riddled with error logs

To Reproduce
Steps to reproduce the behavior:

  1. Create filtered persistent subscription to $all: Filter by StreamID with prefix

Expected behavior
No errors

Actual behavior
Server throws errors.

Config/Logs/Screenshots
Stack trace sample:

System.NullReferenceException: Object reference not set to an instance of an object.
   at EventStore.Core.Services.Storage.ReaderIndex.EventFilter.StreamIdPrefixStrategy.IsEventAllowed(EventRecord eventRecord) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Services/Storage/ReaderIndex/EventFilter.cs:line 144
   at EventStore.Core.Services.PersistentSubscription.PersistentSubscription.NotifyLiveSubscriptionMessage(ResolvedEvent resolvedEvent) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Services/PersistentSubscription/PersistentSubscription.cs:line 291
   at EventStore.Core.Services.PersistentSubscription.PersistentSubscriptionService`1.ProcessEventCommited(String eventStreamId, Int64 commitPosition, EventRecord evnt) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Services/PersistentSubscription/PersistentSubscriptionService.cs:line 1000
   at EventStore.Core.Bus.MessageHandler`1.TryHandle(Message message) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Bus/MessageHandler.cs:line 30
   at EventStore.Core.Bus.InMemoryBus.Publish(Message message) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Bus/InMemoryBus.cs:line 290
   at EventStore.Core.Bus.QueuedHandlerThreadPool.ReadFromQueue(Object o) in /home/runner/work/TrainStation/TrainStation/build/oss-eventstore/src/EventStore.Core/Bus/QueuedHandlerThreadPool.cs:line 140

EventStore details

  • EventStore server version:
    23.10.1.0
  • Operating system:
    Docker: bookworm-slim
  • EventStore client library and version (if applicable):
    Golang client, latest

Additional context

DB-720

@m-guesnon-pvotal m-guesnon-pvotal changed the title System.NullReferenceException for $all subscription filtering by EventType prefix System.NullReferenceException for $all subscription filtering by StreamID prefix Feb 29, 2024
@timothycoleman
Copy link
Contributor

Linear issue linked: DB-720

@w1am
Copy link
Contributor

w1am commented Mar 29, 2024

@m-guesnon-pvotal Do you have a reproducible sample that we can use to debug this? I can't reproduce it on my end

Event Store server version
docker: eventstore/eventstore:23.10.1-bookworm-slim

Go client version
Tested with version v3.3.0 and v4.0.0

Go version
go version go1.22.0 linux/amd64

@m-guesnon-pvotal
Copy link
Author

Sorry, I don't have a sample anymore. But iirc, it might have been because we had linkTos enabled and it was linking to already scavenged events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants