-
Notifications
You must be signed in to change notification settings - Fork 250
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
fix: remove actor system for transactions, refactor iTX and tracing #5001
Conversation
WASM Query Engine file Size
|
CodSpeed Performance ReportMerging #5001 will not alter performanceComparing Summary
|
I'm waiting for #5003 before being able to release a new integration version. |
21703fd
to
0014c6b
Compare
d9c03d9
to
ff4016d
Compare
/// immediately removed by the background task from the common hashmap. In this case, either | ||
/// our operation will be first or the background cleanup task will be first. Both cases are | ||
/// an acceptable outcome. | ||
transactions: Arc<RwLock<HashMap<TxId, Arc<Mutex<InteractiveTransaction>>>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about using DashMap
here btw but I'm not sure if it's worth adding a new dependency. As Nikita wrote above, even though we use coarse-grained locking on the hash map, the lock is only held for a tiny fraction of time. I'm actually thinking even RwLock
might not be worth it here and a regular Mutex
would be just fine while having lower overhead. All of this is moot without benchmarks of course, just thinking out loud.
crosstarget_utils::time::sleep(timeout).await; | ||
timeout_sender.send(tx_id).expect("receiver must exist"); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add with_subscriber().with_recorder()
here because neither is used in the task and it's fairly small
// Note: This method creates a self-referential struct, which is why we need unsafe. Field | ||
// `tx` is referencing field `conn` in the `Self::Open` variant. | ||
let mut conn = Box::into_pin(conn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: experiment with a dedicate Rust crate that removes unsafe
, e.g.:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lot of changes, but good job @aqrln!
I've left a couple of nit comments.
This file is unused, as the actors system was removed in prisma#5001
This file is unused, as the actors system was removed in #5001
This reverts commit e1242e1 and re-applies #4940.
Integration: prisma/prisma#25285
Fixes: https://github.com/prisma/team-orm/issues/1270
Fixes: prisma/prisma#23792
Fixes: #4336
Fixes: prisma/prisma#21402
Fixes: prisma/prisma#20694
Closes: https://github.com/prisma/team-orm/issues/1285
Closes: prisma/prisma#25436
/integration