Fix database truncation, logging, and object handling issues#125
Merged
cgalibern merged 4 commits intoopensvc:mainfrom Feb 24, 2026
Merged
Fix database truncation, logging, and object handling issues#125cgalibern merged 4 commits intoopensvc:mainfrom
cgalibern merged 4 commits intoopensvc:mainfrom
Conversation
- Added support for trimming prefixes from `diskID` and `devID` for consistent data storage. - Updated `updateDB` method to process `disk!by-id!` entries and reduce their size.
…tMax` constant - Implemented truncation of `statusLog` to adhere to the `TextMax` limit in database operations. - Added `TextMax` constant in `cdb/constants.go` for shared size constraints. - Updated error messages to include the length of the `statusLog` for improved debugging.
InstanceResourceInfoUpdate truncates resinfo.res_value to 255 characters to prevent database errors
- Added `ModifierMaxLen(8)` to `pkg_arch` database mapping to ensure data does not exceed varchar(8) limit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses several key issues in the system:
res_valueinInstanceResourceInfoUpdateto 255 characters to prevent database errors.TextMaxconstant forstatusLogto enforce database size constraints.diskIDanddevIDto standardize and optimize stored values.JobRunnerinterface for detailed, contextualized logging.findObjectFromDbto correctly assignobjectIDwhen creating or retrieving database objects.These changes improve system reliability, debugging efficiency, and adherence to database constraints.