-
Notifications
You must be signed in to change notification settings - Fork 38
Add cobj-idx migrate and cobj-idx unlock
#693
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
Add cobj-idx migrate and cobj-idx unlock
#693
Conversation
* set the transaction mode to EXCLUSIVE * set busy_timeout to 5000
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.
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
migratesubcommand to update pre-1.1.12 indexed files to the latest format with lock-related schema migrations - Added
unlocksubcommand 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.
...main/java/jp/osscons/opensourcecobol/libcobj/user_util/indexed_file/IndexedFileUtilMain.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request adds two new subcommands,
migrateandunlock, to thecobj-idxutility for managing indexed files. It also introduces comprehensive tests for these features and updates the documentation and build system accordingly.New Features:
migratesubcommand to update older indexed files (pre-1.1.12) to the latest format, including schema migrations for lock-related columns. (IndexedFileUtilMain.java) [1] [2]unlocksubcommand to forcibly release all locks on an indexed file, clearing both file and record locks. (IndexedFileUtilMain.java) [1] [2]Documentation Updates:
migrateandunlocksubcommands. (IndexedFileUtilMain.java)Testing and Build System:
migrateandunlockcommands, ensuring proper migration and lock release behaviors. (tests/cobj-idx.src/migrate.at,tests/cobj-idx.src/unlock.at) [1] [2]tests/Makefile.am,tests/Makefile.in,tests/cobj-idx.at) [1] [2] [3]