Eventstore: Exception: failed to handle event because complete TF position required (Parameter 'committedEvent')

Created on 13 Jan 2021  路  3Comments  路  Source: EventStore/EventStore

Describe the bug

Projection may fault after periodically with exception:

{"@t":"2020-12-09T10:30:55.4407703Z","@mt":"The '{projection}' projection faulted due to '{e}'","@l":"Error","projection":"myprojection","e":"The heading subscription failed to handle an event-996553a5-fca4-4f53-b9c3-bebe300720d2:sampleevent@163301 because complete TF position required (Parameter 'committedEvent')","SourceContext":"EventStore.Projections.Core.Services.Management.ProjectionManager","ProcessId":5448,"ThreadId":23}

To Reproduce
Steps to reproduce the behavior:

  1. Create a projection with code:

fromAll().when({ "sampleevent" : function(state,event) { emit("myprojection", "EventLtIdAdded",{ LtId: event.body.LtdId, Id: event.body.AggregateId }) } } );

  1. Add events that will be handle by this custom projection

Expected behavior
Projection should not fault.

Actual behavior
Custom Projection faults unexpectedly and require the projection to be reset to resume operations.

EventStore details
20.6.1

  • Operating system:

    Windows Server 2016

customer initiated kinbug

Most helpful comment

Reproduction steps:

  1. Create the following two projections:
fromStream('foo')
.when({
        $any: function (state, event) {
            if (event.data)
            {
                linkTo("bar", event);
            }
        }
    }
);
fromAll().when(
{
    $init: function() {
        return { events: [] };
    },
    "baz" : function(state, event){
        state.events.push(event);
    }
});
  1. Write an event to stream foo with event type baz
  2. The second projection will fault with the reported error.

It seems that this issue is caused by reading linked events from $all, as this doesn't occur if you use fromStreams.

All 3 comments

Reproduction steps:

  1. Create the following two projections:
fromStream('foo')
.when({
        $any: function (state, event) {
            if (event.data)
            {
                linkTo("bar", event);
            }
        }
    }
);
fromAll().when(
{
    $init: function() {
        return { events: [] };
    },
    "baz" : function(state, event){
        state.events.push(event);
    }
});
  1. Write an event to stream foo with event type baz
  2. The second projection will fault with the reported error.

It seems that this issue is caused by reading linked events from $all, as this doesn't occur if you use fromStreams.

Write an event to stream foo with event type baz

Just adding that the event type does not necessarily need to be baz in step 2 - it can be any event type.

@shaan1337 Hi there! Do you have any idea about the release date of this fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShawnMcCool picture ShawnMcCool  路  11Comments

davidgoate picture davidgoate  路  7Comments

andrii-litvinov picture andrii-litvinov  路  4Comments

mandeep-rubicon picture mandeep-rubicon  路  8Comments

pkruithof picture pkruithof  路  5Comments