Comments (10)
This would not be a problem if we remove the logical-delete
and include-deleted
flag from the HOCON settings. The fake entry would not be read during recovery and query operation because it is marked as deleted. It will break thing if users are actually reading the journal table directly though.
from akka.persistence.sql.
cc @to11mtm
from akka.persistence.sql.
@Aaronontheweb So this is one of the many vaunted compatibility mode switches 😅
- The way JVM/Linq2Db do things is better because it minimizes the total number of pages written on commit.
- Also, it's one less page being read on read.
- FWIW, Persistence.Linq2db -should- be able to handle both.
- but to be clear it's kinda gnarly code, and there may be some edge cases around 'converting' to the JVM method.
I can say from experience that Linq2Db/JVM's approach handles frequent deletes -much- better than Sql.Common's JournalMetadata
paradigm on MSSQL.
https://github.com/akkadotnet/Akka.Persistence.Linq2Db/blob/dev/src/Akka.Persistence.Sql.Linq2Db/Journal/DAO/BaseByteArrayJournalDao.cs#L385 <-- Compat Mode Query
https://github.com/akkadotnet/Akka.Persistence.Linq2Db/blob/dev/src/Akka.Persistence.Sql.Linq2Db/Journal/DAO/BaseByteArrayJournalDao.cs#L373 <-- JVM-style Native Query
We also handle it on the actual Delete of course, but the logic is a bit uglier.
This may or may not be another migration step to consider, or making this compat flag ternary for better forward-compatibility.
from akka.persistence.sql.
Thanks @to11mtm - this is very helpful. This issue was mostly created as a discussion point so we can reason about the backwards compat specs and what to do going forward.
from akka.persistence.sql.
Thanks @to11mtm - this is very helpful. This issue was mostly created as a discussion point so we can reason about the backwards compat specs and what to do going forward.
For sure; it's also worthwhile to have some level of documentation (even if it's in this issue) around the overall rationale for the change.
Realistically, a 'seamless' migration would require at minimum a migration script; the 'tricky' thing is that we would need some 'fake' event to put into the journal tables based on migration.
I suppose the other option would be the aforementioned ternary; it would at least minimize pain on 'new' persistenceIds (as they would elide at least the writes to Metadata) but would still have a read check+union (although, if metadata is properly indexed, should be fast to see it's not there.)
from akka.persistence.sql.
This would not be a problem if we remove the logical-delete and include-deleted flag from the HOCON settings. The fake entry would not be read during recovery and query operation because it is marked as deleted. It will break thing if users are actually reading the journal table directly though.
Any reason we shouldn't do this @to11mtm ? I think this approach makes a lot of sense.
from akka.persistence.sql.
My take is that we'll be implementing both model, but the metadata table will only be supported on a legacy system?
We will need to clean up the HOCON configuration for linq2db, its a bit too convoluted right now, especially with the addition of TagTable
from akka.persistence.sql.
@Arkatufus was this resolved in yesterday's PR? #145
from akka.persistence.sql.
@Aaronontheweb @Arkatufus Can we close this?
from akka.persistence.sql.
@to11mtm yep!
from akka.persistence.sql.
Related Issues (20)
- Update Journal event deletion behavior HOT 4
- Need to reintroduce row insertion optimization
- Rebrand this repo to "Akka.Persistence.Sql" HOT 1
- Upgrade Linq2db HOT 3
- `CurrentEventsByTag` query on PostgreSql returns unordered events
- Implement WriterUuid feature
- Add CSV and TagTable unit tests for query
- Add documentation for beta release
- Make sure to add migration not supported warning in documentation
- Look into supporting DateTime and long databases
- Bump Npgsql from 6.0.7 to 7.0.2
- Csv and tag table based query configuration isn't being read consistently on all code path
- Make sure that we're using the new protobuf backed serializer HOT 3
- Update default HOCON configuration to be greenfield project friendly
- Auto initialization of tables isn't supported from the read journal side. HOT 5
- CurrentEventsByTag query on Sqlite has a weird initial delay HOT 7
- High memory usage HOT 16
- Feature: Store Tags in separate table rather than inline
- Feature Req: Create a Helper application to help users migrate away from journal_metadata
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akka.persistence.sql.