Skip to content

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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

vilenarios
Copy link
Collaborator

@vilenarios vilenarios commented Jun 17, 2025

Copy link

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

@fedellen fedellen self-requested a review June 19, 2025 20:11
Copy link

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

Copy link

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

Comment on lines -35 to 37
foldersInFolder ($order = ''):
foldersInFolder:
SELECT * FROM folder_entries
WHERE driveId = :driveId AND parentFolderId = :parentFolderId
ORDER BY $order;
WHERE driveId = :driveId AND parentFolderId = :parentFolderId;

Copy link
Contributor

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?

Comment on lines +207 to +215
// 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());
}
Copy link
Contributor

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

Comment on lines +613 to +626

// 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();
Copy link
Contributor

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?

Copy link

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

Copy link

⚠️ Your PR title does not match the required pattern. Please update the title in the format PE-{number}: {description}.

Copy link

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

@vilenarios vilenarios changed the title Pe 8183 snapshots for extensions PE-8183: snapshots for extensions Jun 25, 2025
Comment on lines +180 to +186
// 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);
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants