Hi, anyone tried Drizzle for durable Objects transactions? async initialize( transferData: TransferInitData ): Promise { this.logger.debug(`Initializing transfer: ${this.state.id}`); // Calculate expiration based on TTL from transferDetails or default const ttlDays = transferData.transferDetails?.ttl || this.env.DEFAULT_SHARE_TTL_DAYS || 7; const expiresAt = new Date(Date.now() + ttlDays * 24 * 60 * 60 * 1000).toISOString(); await this.db.transaction(async (tx) => { // Hash password if provided let passwordHash: string | null = null; if (transferData.transferDetails?.password) { passwordHash = await this.hashPassword(transferData.transferDetails.password); } // Insert data using transaction await tx.insert(schema.downloadsTable).values({ id: this.transferId, userId: transferData.userId, fileSize: transferData.fileSize, fileName: transferData.fileName, contentType: transferData.contentType, status: TransferStatus.READY, downloadCount: 0, createdAt: new Date().toISOString(), expiresAt: expiresAt }); // Insert transfer details await tx.insert(schema.transferDetailsTable).values({ transferId: this.transferId, ttl: ttlDays, notifyCreation: transferData.transferDetails?.notifyCreation ? 1 : 0, notifyDownloads: transferData.transferDetails?.notifyDownloads ? 1 : 0, notifyNonDownload: transferData.transferDetails?.notifyNonDownload ? 1 : 0, notifyExpiry: transferData.transferDetails?.notifyExpiry ? 1 : 0, requireEmail: transferData.transferDetails?.requireEmail ? 1 : 0, emailSharing: transferData.transferDetails?.emailSharing ? JSON.stringify(transferData.transferDetails.emailSharing) : null, passwordHash: passwordHash }); // Insert parts from transfer data if (transferData.parts && transferData.parts.length > 0) { for (const part of transferData.parts) { await tx.insert(schema.transferPartsTable).values({ id: part.id, transferId: this.transferId, size: part.size, sha1: part.sha1 || null, storage: part.storage }); } } }, { behavior: "immediate" // Use immediate locking for better concurrency control }); // Note: We'll set the alarm outside the transaction since it's not part of the database transaction // After transaction completes successfully, return the details // We need to use 'this.db' here, not 'tx', because we're outside the transaction context // when fetching the final result console.log(`[DownloadTracker] Setting alarm for expiration: ${expiresAt}`); // Set alarm for expiration - this happens after the transaction await this.state.storage.setAlarm(new Date(expiresAt)); return await this.getStatus(); } async getStatus(): Promise { this.logger.debug(`Getting details for transfer: ${this.transferId}`); // Get download data - no explicit transaction needed as the system ensures consistency const download = await this.db.select() .from(schema.downloadsTable) .where(eq(schema.downloadsTable.id, this.transferId)) .get(); if (!download) { throw new TransferNotFoundError(this.transferId); } return download; } the getStatus doesn't wait for the transaction to finish, why is that happening ?