-
Notifications
You must be signed in to change notification settings - Fork 19
PE-8183: snapshots for extensions #2044
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
base: dev
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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