Skip to content

Add missing OJP server configurations and fix Prometheus port default#5

Merged
rrobetti merged 3 commits intomainfrom
copilot/review-configurations-not-mapped
Jan 8, 2026
Merged

Add missing OJP server configurations and fix Prometheus port default#5
rrobetti merged 3 commits intomainfrom
copilot/review-configurations-not-mapped

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 30, 2025

Audited OJP server configurations against Helm chart mappings. Found two missing parameters and one incorrect default.

Changes

  • Added missing parameter: slowQuerySegregation.updateGlobalAvgInterval (default: 300s)

    • Controls global average execution time update interval for slow query segregation
    • Mapped to OJP_SERVER_SLOWQUERYSEGREGATION_UPDATEGLOBALAVGINTERVAL env var
  • Added missing parameter: driversPath (default: "./ojp-libs")

    • External libraries directory path for drop-in JDBC drivers
    • Mapped to OJP_LIBS_PATH env var
  • Fixed Prometheus port default: Changed from 9090 to 9159

    • Helm chart default didn't match OJP server default
    • Affects both values.yaml and service configuration
  • Version bump: 0.1.2 → 0.1.4

Configuration Mapping

All 19 OJP server configurations now properly mapped:

server:
  port: 1059
  prometheusPort: 9159  # was 9090
  # ... other configs ...
  slowQuerySegregation:
    enabled: true
    slowSlotPercentage: 20
    idleTimeout: 10000
    slowSlotTimeout: 120000
    fastSlotTimeout: 60000
    updateGlobalAvgInterval: 300  # new
  logLevel: INFO
  driversPath: "./ojp-libs"  # new

Verified against org.openjproxy.grpc.server.ServerConfiguration source.

Note on XA Pool Configurations

The XA pool constants (DEFAULT_XA_POOLING_ENABLED, DEFAULT_XA_MAX_POOL_SIZE, etc.) in ServerConfiguration.java are hardcoded defaults not exposed as configurable server properties. They cannot be set via environment variables or system properties at the server level.

Original prompt

Do a review of configurations present in https://github.com/Open-J-Proxy/ojp/tree/main that are not mapped here in the helm charts.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Added slowQuerySegregation.updateGlobalAvgInterval (default: 300 seconds)
- Fixed prometheusPort default from 9090 to 9159 to match OJP server default
- Updated Chart version from 0.1.2 to 0.1.3
- Updated ConfigMap template to include new environment variable
- Updated README.md documentation with new parameter and corrected port

Co-authored-by: rrobetti <[email protected]>
Copilot AI changed the title [WIP] Review configurations not mapped in helm charts Add missing slow query configuration and fix Prometheus port default Dec 30, 2025
Copilot AI requested a review from rrobetti December 30, 2025 12:09
@rrobetti
Copy link
Copy Markdown
Collaborator

@copilot what about the xa pool related configurations? I feel like you missed many new configurations here.

- Added server.driversPath (default: "./ojp-libs") configuration
- Maps to OJP_LIBS_PATH environment variable
- Updated Chart version from 0.1.3 to 0.1.4
- Updated ConfigMap template and README.md
- All 19 OJP server configurations now properly mapped

Co-authored-by: rrobetti <[email protected]>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot what about the xa pool related configurations? I feel like you missed many new configurations here.

I reviewed the ServerConfiguration.java source and found one additional missing configuration: driversPath (ojp.libs.path). Added in commit 2b673b0.

Regarding XA pool configurations: The DEFAULT_XA_* constants in ServerConfiguration.java (lines 62-68) are hardcoded defaults that aren't exposed as configurable properties. They don't have corresponding configuration keys and aren't loaded from environment variables or system properties - they're just internal constants used by the server.

All 19 server-level configurable parameters from the OJP source are now properly mapped in the Helm chart.

Copilot AI changed the title Add missing slow query configuration and fix Prometheus port default Add missing OJP server configurations and fix Prometheus port default Dec 30, 2025
@rrobetti rrobetti marked this pull request as ready for review December 30, 2025 17:12
@rrobetti rrobetti merged commit f59387c into main Jan 8, 2026
1 check 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