Skip to content

Comments

Fix database truncation, logging, and object handling issues#125

Open
cgalibern wants to merge 4 commits intoopensvc:mainfrom
cgalibern:dev
Open

Fix database truncation, logging, and object handling issues#125
cgalibern wants to merge 4 commits intoopensvc:mainfrom
cgalibern:dev

Conversation

@cgalibern
Copy link
Contributor

Summary

This pull request addresses several key issues in the system:

  • Truncates res_value in InstanceResourceInfoUpdate to 255 characters to prevent database errors.
  • Adds truncation logic and TextMax constant for statusLog to enforce database size constraints.
  • Implements trimming for diskID and devID to standardize and optimize stored values.
  • Introduces a per-job logger in the JobRunner interface for detailed, contextualized logging.
  • Fixes findObjectFromDb to correctly assign objectID when creating or retrieving database objects.

These changes improve system reliability, debugging efficiency, and adherence to database constraints.

- 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.
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.

1 participant