Skip to content

Conversation

@yutaro-sakamoto
Copy link
Contributor

@yutaro-sakamoto yutaro-sakamoto commented Aug 22, 2025

This pull request adds two new subcommands, migrate and unlock, to the cobj-idx utility for managing indexed files. It also introduces comprehensive tests for these features and updates the documentation and build system accordingly.

New Features:

  • Added migrate subcommand to update older indexed files (pre-1.1.12) to the latest format, including schema migrations for lock-related columns. (IndexedFileUtilMain.java) [1] [2]
  • Added unlock subcommand to forcibly release all locks on an indexed file, clearing both file and record locks. (IndexedFileUtilMain.java) [1] [2]

Documentation Updates:

  • Updated the help message to include descriptions and usage for the new migrate and unlock subcommands. (IndexedFileUtilMain.java)

Testing and Build System:

  • Added new test scripts and data for migrate and unlock commands, ensuring proper migration and lock release behaviors. (tests/cobj-idx.src/migrate.at, tests/cobj-idx.src/unlock.at) [1] [2]
  • Updated test inclusion and dependencies to integrate the new test cases. (tests/Makefile.am, tests/Makefile.in, tests/cobj-idx.at) [1] [2] [3]

@yutaro-sakamoto yutaro-sakamoto marked this pull request as ready for review August 22, 2025 01:42
Copilot AI review requested due to automatic review settings August 22, 2025 01:42
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 pull request adds two new subcommands (migrate and unlock) to the cobj-idx utility for managing indexed files. The migrate command updates older indexed files to the latest format, while the unlock command forcibly releases all locks on an indexed file.

  • Added migrate subcommand to update pre-1.1.12 indexed files to the latest format with lock-related schema migrations
  • Added unlock subcommand to clear both file and record locks from indexed files
  • Comprehensive test coverage for both new subcommands with COBOL test programs and Java helper classes

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IndexedFileUtilMain.java Implements the core logic for migrate and unlock subcommands with command-line parsing and database operations
unlock.at Test cases for unlock functionality including lock creation, verification, and release scenarios
migrate.at Test cases for migrate functionality using pre-existing test data files
cobj-idx.at Includes the new test files in the test suite
Makefile.in, Makefile.am Updates build dependencies to include new test files

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yutaro-sakamoto yutaro-sakamoto merged commit f2d31fd into opensourcecobol:develop Aug 27, 2025
145 checks passed
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