Skip to content

Conversation

@aonnikov
Copy link
Member

No description provided.

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-13188

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes proper cleanup of iterators by ensuring they are closed in finally blocks to prevent resource leaks. The changes address iterator resource management issues across multiple files.

  • Wrap iterator usage in try-finally blocks to guarantee proper cleanup
  • Fix typos in error messages from "failed t oclean all objecrs" to "failed to clean all objects"
  • Reorganize iterator creation to be closer to usage in migration functions

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/s3/src/index.ts Fixes typo in error message
server/minio/src/index.ts Fixes typo in error message
packages/storage/src/index.ts Adds try-finally blocks to ensure iterator cleanup in removeAllObjects and objectsToArray
models/server-activity/src/migration.ts Wraps document iteration in try-finally for proper cleanup
models/contact/src/migration.ts Moves iterator creation closer to usage
dev/tool/src/storage.ts Ensures both iterators are closed properly
dev/tool/src/clean.ts Adds try-finally block for iterator cleanup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@haiodo haiodo merged commit 33b597d into develop Aug 20, 2025
14 of 15 checks passed
@aonnikov aonnikov deleted the fix-iterator-close-issues branch August 26, 2025 04:41
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.

4 participants