PE-8183: snapshots for extensions#2044
Conversation
|
|
|
|
|
|
|
|
||
| foldersInFolder ($order = ''): | ||
| foldersInFolder: | ||
| SELECT * FROM folder_entries | ||
| WHERE driveId = :driveId AND parentFolderId = :parentFolderId | ||
| ORDER BY $order; | ||
| WHERE driveId = :driveId AND parentFolderId = :parentFolderId; | ||
|
|
There was a problem hiding this comment.
why does order disappear in these DB queries?
| // Give the UI time to show the syncing state before allowing the user to close | ||
| await Future.delayed(const Duration(seconds: 2)); | ||
|
|
||
| // Check if still in syncing state (user hasn't closed the modal) | ||
| if (!isClosed && state is DriveAttachSyncing) { | ||
| /// Emit success to indicate the attach is complete | ||
| /// The sync continues in the background | ||
| emit(DriveAttachSuccess()); | ||
| } |
There was a problem hiding this comment.
seems fishy here, wondering if is there a chance we leave the user stuck
|
|
||
| // If no snapshots found and we have an owner address, try owner-specific search | ||
| if (snapshotItems.isEmpty && ownerAddress.isNotEmpty) { | ||
| logger.d('No general snapshots found, trying owner-specific for ${drive.id}'); | ||
| final ownerSnapshotsStream = _arweave.getAllSnapshotsOfDrive( | ||
| driveId, | ||
| lastBlockHeight, | ||
| ownerAddress: ownerAddress, | ||
| ); | ||
|
|
||
| snapshotItems = await SnapshotItem.instantiateAll( | ||
| ownerSnapshotsStream, | ||
| arweave: _arweave, | ||
| ).toList(); |
There was a problem hiding this comment.
I dont see how this flow is possible. if we don't find snapshots for ALL owners, why would we find snapshots from this owner?
|
|
|
|
|
Visit the preview URL for this PR (updated for commit 7d27d3e): https://ardrive-web--pr2044-pe-8183-snapshots-fo-jvslg1ie.web.app (expires Wed, 02 Jul 2025 20:52:10 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0 |
| // Process in chunks to avoid memory issues with large datasets | ||
| const chunkSize = 100; | ||
| for (var i = 0; i < revisions.length; i += chunkSize) { | ||
| final end = (i + chunkSize < revisions.length) | ||
| ? i + chunkSize | ||
| : revisions.length; | ||
| final chunk = revisions.sublist(i, end); |
There was a problem hiding this comment.
getting some longer loads on my big drive. this area might be the cause. wonder if we tweak the chunkSizes?
--- Releases ---
Android release: https://appdistribution.firebase.google.com/testerapps/1:305132849030:android:6cf0cd5ec064fad3ffce07/releases/3f2hnrj8blmh8