Storage layer refactoring: faster id generation, automatic batching and virtual thread ids

This commit is contained in:
mdecimus
2025-04-02 17:37:14 +02:00
parent 76f085ab7c
commit fac2975a5a
152 changed files with 3489 additions and 4039 deletions

View File

@@ -629,17 +629,19 @@ async fn internal_directory() {
let mut document_id = u32::MAX;
for account_id in [john_id, jane_id] {
document_id = store
.assign_document_ids(u32::MAX, Collection::Principal, 1)
.await
.unwrap();
store
.write(
BatchBuilder::new()
.with_account_id(account_id)
.with_collection(Collection::Email)
.create_document()
.create_document(document_id)
.set(ValueClass::Property(0), "hello".as_bytes())
.build_batch(),
.build_all(),
)
.await
.unwrap()
.last_document_id()
.unwrap();
assert_eq!(
store