question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LoadStreamHeaders does not load soft deleted headers

See original GitHub issue

I am planning to use LoadStreamHeaders method for loading streams having changes since a certain time. The load is done scheduled: For example I first load headers having changes since 1.1.2021. and then load streams that are on different version to my read repository.

When an aggregate is set to deleted state, I also soft delete it’s stream. With this procedure I was expecting to be able to figure from the stream header, when the stream is having new events, or when the stream is deleted and reflect that to my read repo but it seems the method doesn’t return soft deleted headers:

await callback(page.Where(x => x.DocumentType == DocumentType.Header).Where(x => !x.Deleted).Select(x => new StreamHeader(x.StreamId, x.Version, this.Serializer.DeserializeObject(x.MetadataType, x.Metadata))).ToList());

I would appreciate if this could be modified to suit my needs.

  • Ari

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jkoneckicommented, Jan 22, 2021

Yes, of course, I totally missed that!

On Fri, 22 Jan 2021, 12:14 AriKuorikoski, notifications@github.com wrote:

@jkonecki https://github.com/jkonecki, I just updated to latest version and realized that the StreamHeader doesn’t expose if the stream is deleted or active. Could you consider making the isDeleted property visible on the class? Could be also usable on EventData class.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Eveneum/Eveneum/issues/19#issuecomment-765357355, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRND4HQVSAUIQOAYDMKDDS3FT3JANCNFSM4WDVBODQ .

1reaction
jkoneckicommented, Jan 15, 2021

Hello Ari, that is a reasonable request. I’ll try to implement it and push the new version out in a few hours.

On Fri, 15 Jan 2021, 07:43 AriKuorikoski, notifications@github.com wrote:

I am planning to use LoadStreamHeaders method for loading streams having changes since a certain time. The load is done scheduled: For example I first load headers having changes since 1.1.2021. and then load streams that are on different version to my read repository.

When an aggregate is set to deleted state, I also soft delete it’s stream. With this procedure I was expecting to be able to figure from the stream header, when the stream is having new events, or when the stream is deleted and reflect that to my read repo but it seems the method doesn’t return soft deleted headers:

await callback(page.Where(x => x.DocumentType == DocumentType.Header).Where(x => !x.Deleted).Select(x => new StreamHeader(x.StreamId, x.Version, this.Serializer.DeserializeObject(x.MetadataType, x.Metadata))).ToList());

I would appreciate if this could be modified to suit my needs.

  • Ari

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Eveneum/Eveneum/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRNDYGGGCP2XDQFJL3PUDSZ7W2PANCNFSM4WDVBODQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced.feature
Deleted and (c.StreamId = 'B' or c.StreamId = 'D') Then all 100 events are loaded And request charge is reported Scenario: Querying stream...
Read more >
REST for soft delete and recovering soft deleted resources ...
I'm not sure this makes sense even within the web development realm; the starting premises seem to be wrong.
Read more >
Trouble viewing email header in MS Defender under mail ...
When a message is soft deleted or hard deleted by the user or the admin, its details no longer exist in the mailbox...
Read more >
Advice wanted - soft deletes : r/PostgreSQL
I work with a system that uses deleted_at, and it's just awful. You can't enforce data consistency on soft delete, so you might...
Read more >
A guide to soft-delete models in Laravel
Use soft deletes in Laravel if you want to be able to restore them. ... After that,you are good to go and soft...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found