Skip to content

fix(ers): lazily register database/sql driver in SQL ERS provider#3543

Open
jp-ayyappan wants to merge 7 commits into
mainfrom
fix/ers-sql-provider-register-postgres-driver
Open

fix(ers): lazily register database/sql driver in SQL ERS provider#3543
jp-ayyappan wants to merge 7 commits into
mainfrom
fix/ers-sql-provider-register-postgres-driver

Conversation

@jp-ayyappan

@jp-ayyappan jp-ayyappan commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3539.

The multi-strategy ERS SQL provider called sql.Open(config.Driver, ...) but relied on consumers to register the named driver via a blank import (e.g. _ "github.com/lib/pq"). This forced every consumer — even those not using the SQL ERS tier — to register the driver globally at init() time.

Changes

Lazy driver registration in NewProvider() via ensureDriverRegistered():

  1. Normalizes config.Driver to lowercase + trimmed at the top of NewProvider — ensures both ensureDriverRegistered and sql.Open receive the canonical lowercase name, preventing mixed-case inputs (e.g., "Postgres") from bypassing the pre-check or failing sql.Open with "unknown driver"
  2. Checks registeredDrivers map (fast path for repeated calls)
  3. Checks sql.Drivers() with strings.EqualFold — gracefully handles drivers already registered by the consumer binary
  4. Registers "postgres" via pgx/v5/stdlib.GetDefaultDriver() on first use — no new dependency (pgx/v5 is already a direct dependency of this module)

Uses a sync.Mutex guard so concurrent NewProvider() calls are safe.

Behavior

Scenario Result
First SQL provider created, "postgres" not yet registered Registers via pgx stdlib
Second SQL provider created (same or different driver name) No-op (already in registeredDrivers)
Consumer already registered "postgres" (blank import) No-op (detected via sql.Drivers() pre-check)
Consumer passes driver: Postgres (mixed case) Normalized to "postgres" in NewProvider — no panic, no "unknown driver" error
Consumer passes driver: mysql Not auto-registered (no mysql dep in this module); consumer must import driver

Testing

  • Existing SQL provider unit tests pass (go test ./entityresolution/multi-strategy/providers/sql/...)
  • Build verified (go build ./entityresolution/multi-strategy/...)

Notes

  • mysql and sqlite drivers are documented as requiring consumer-side imports until their dependencies are added to this module's go.mod
  • Consumers that previously added _ "github.com/lib/pq" continue to work correctly — the sql.Drivers() pre-check detects the existing registration and skips sql.Register

Summary by CodeRabbit

  • New Features

    • PostgreSQL driver is now lazily and concurrency-safe auto-registered, removing the need for a manual blank import for PostgreSQL.
  • Improvements

    • Driver names are normalized (case-insensitive) for consistent resolution.
    • The default PostgreSQL driver value is standardized to a single constant.
  • Notes

    • MySQL and SQLite still require consumer-provided driver imports; outdated guidance about blank imports was removed.

@jp-ayyappan jp-ayyappan requested a review from a team as a code owner May 28, 2026 20:27
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the SQL ERS provider to handle database driver registration internally and lazily. By moving registration from global init() calls to the provider instantiation phase, the module reduces unnecessary dependencies for consumers who do not utilize the SQL ERS tier, while maintaining backward compatibility for those who continue to register drivers manually.

Highlights

  • Lazy Driver Registration: Implemented a thread-safe lazy registration mechanism for database/sql drivers, removing the requirement for consumers to perform global blank imports.
  • PostgreSQL Support: Integrated pgx/v5/stdlib to automatically register the 'postgres' driver when a SQL ERS provider is instantiated.
  • Compatibility: Added a pre-check against sql.Drivers() to ensure that existing consumer-side driver registrations are respected and do not cause duplicate-registration panics.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


The driver waits in silent sleep, Until the provider starts to creep. No global import needed now, We register with a lazy bow.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The SQL provider adds a module-level PostgreSQL driver constant, a mutex-protected lazy driver registration helper, and calls that helper from NewProvider to auto-register PostgreSQL via pgx stdlib before opening the DB; MySQL/SQLite still require consumer imports.

Changes

Lazy PostgreSQL Driver Auto-Registration

Layer / File(s) Summary
Config default constant
service/entityresolution/multi-strategy/providers/sql/sql_config.go
Adds defaultPostgreSQLDriver constant and uses it in DefaultConfig() instead of an inline "postgres" literal.
Driver auto-registration mechanism
service/entityresolution/multi-strategy/providers/sql/sql_provider.go
Adds mutex-protected registeredDrivers tracking and ensureDriverRegistered() which normalizes driver names, checks sql.Drivers(), and lazily registers the PostgreSQL driver via pgx/v5/stdlib.
Provider initialization integration
service/entityresolution/multi-strategy/providers/sql/sql_provider.go
NewProvider() normalizes config.Driver and calls ensureDriverRegistered(config.Driver) before opening the DB; buildConnectionString’s PostgreSQL branch now uses defaultPostgreSQLDriver.
sequenceDiagram
  participant NewProvider
  participant ensureDriverRegistered
  participant sql.Drivers
  participant pgx_stdlib
  NewProvider->>ensureDriverRegistered: call with normalized driver name
  ensureDriverRegistered->>sql.Drivers: list existing drivers
  ensureDriverRegistered-->>pgx_stdlib: register defaultPostgreSQLDriver when missing
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibble through code at dawn's first light,
I stitch a driver in the quiet night,
Lazy and safe, no blank imports to show,
Postgres wakes when the provider says go,
A small hop makes connections flow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: lazy registration of the database/sql driver in the SQL ERS provider, matching the core fix implemented in the code.
Linked Issues check ✅ Passed The PR successfully implements all coding objectives from issue #3539: lazy driver registration in NewProvider, mutex-guarded concurrency safety, driver name normalization, duplicate registration prevention via pre-checks, and PostgreSQL auto-registration via pgx/v5.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue: driver registration logic in sql_provider.go and using a named constant for the PostgreSQL driver in sql_config.go. No unrelated modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ers-sql-provider-register-postgres-driver

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces lazy driver registration for SQL providers to avoid requiring consumers to manually import database drivers. It adds a helper function ensureDriverRegistered that registers the postgres driver using pgx/v5/stdlib if it is not already registered. Feedback on this change highlights a potential issue where mixed-case driver names (e.g., 'Postgres') can bypass the registration check, leading to a duplicate registration panic or an unknown driver error. Normalizing config.Driver to lowercase before registration is recommended to prevent these issues.

@github-actions

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 179.887088ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 91.089647ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 433.789716ms
Throughput 230.53 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 43.442746309s
Average Latency 431.74303ms
Throughput 115.09 requests/second

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@service/entityresolution/multi-strategy/providers/sql/sql_provider.go`:
- Around line 32-48: The ensureDriverRegistered function should normalize the
driver name (e.g., via strings.ToLower) before any checks and keying to avoid
duplicate registration panics: use a lowercasedDriver variable for lookups into
registeredDrivers and comparisons against sql.Drivers(), store the normalized
key into registeredDrivers, and use the normalized value in the switch so
sql.Register("postgres", ...) is only called when no existing "postgres" driver
was found; update references to registeredDrivers, sql.Drivers(), and the switch
in ensureDriverRegistered accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 065a65f0-ebb5-452a-9d63-c23933b085c3

📥 Commits

Reviewing files that changed from the base of the PR and between 5d0508f and 4828bd8.

📒 Files selected for processing (1)
  • service/entityresolution/multi-strategy/providers/sql/sql_provider.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@service/entityresolution/multi-strategy/providers/sql/sql_provider.go`:
- Around line 29-31: ensureDriverRegistered lowercases the local driver but
NewProvider still calls sql.Open(config.Driver,...), causing unknown driver
errors; change the flow so the normalized driver is used for opening the DB —
either have ensureDriverRegistered return the normalized driver (or set
config.Driver = normalized inside it) and then call sql.Open(normalizedDriver,
cfg.ConnectionString) in NewProvider (references: ensureDriverRegistered,
NewProvider, sql.Open, config.Driver).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 76124089-096c-473f-bda9-db8191e3b3cd

📥 Commits

Reviewing files that changed from the base of the PR and between 4828bd8 and b2cf821.

📒 Files selected for processing (1)
  • service/entityresolution/multi-strategy/providers/sql/sql_provider.go

@github-actions

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 148.362773ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 79.031597ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 405.419888ms
Throughput 246.66 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 41.392929377s
Average Latency 412.698266ms
Throughput 120.79 requests/second

@github-actions

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 185.854726ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 101.708203ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 414.975939ms
Throughput 240.98 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 45.038496371s
Average Latency 448.816346ms
Throughput 111.02 requests/second

Previously the SQL provider required consumers to add a blank driver
import (e.g. _ "github.com/lib/pq") to their own binaries, causing
the driver to be registered globally at init time even when the SQL
ERS tier was not configured.

This change moves driver registration into NewProvider() using
pgx/v5/stdlib (already a direct dependency of this module), guarded by
a sync.Mutex and a sql.Drivers() pre-check to prevent duplicate-register
panics when consumers have already registered the driver themselves.

The registration is now lazy: it happens only when a SQL ERS provider is
actually instantiated, and only if the driver has not already been
registered by the consumer or another code path.

Fixes: #3539
Both the registeredDrivers map lookup and the sql.Drivers() pre-check
were case-sensitive, while the switch used strings.ToLower. A consumer
passing driver: Postgres (capital P) would bypass the pre-check and
trigger a duplicate sql.Register panic.

Normalize to strings.ToLower(strings.TrimSpace(driver)) at the top of
ensureDriverRegistered and use strings.EqualFold for the sql.Drivers()
comparison so all case variants map to a single canonical key.

Addresses review feedback from gemini-code-assist and coderabbitai.
ensureDriverRegistered already normalizes its input to lowercase, but
NewProvider was still passing the raw config.Driver to sql.Open. A
mixed-case driver (e.g. 'Postgres') would pass through ensureDriverRegistered
correctly but then fail sql.Open with 'unknown driver' since database/sql
matches driver names by exact string.

Normalize config.Driver at the top of NewProvider so both
ensureDriverRegistered and sql.Open receive the canonical lowercase name.

Addresses review feedback from coderabbitai and gemini-code-assist.
Signed-off-by: jp-ayyappan <jp@as2max.com>
@jp-ayyappan jp-ayyappan force-pushed the fix/ers-sql-provider-register-postgres-driver branch from 0eed6d9 to aa544af Compare June 9, 2026 16:07
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 210.569784ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 102.802107ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 447.056712ms
Throughput 223.69 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.436573565s
Average Latency 442.408397ms
Throughput 112.52 requests/second

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@service/entityresolution/multi-strategy/providers/sql/sql_provider.go`:
- Around line 43-46: The pre-check in ensureDriverRegistered incorrectly uses
case-insensitive comparison and can treat a mixed-case registered driver (e.g.,
"Postgres") as satisfying the canonical lowercase name, causing us to skip
registering "postgres"; update the check to compare canonical lowercase names
instead (e.g., use if strings.ToLower(d) == driver) so we only treat an existing
driver as registered when its lowercase form equals the canonical driver
variable, and apply the same change to the other occurrence referenced in the
file; refer to ensureDriverRegistered, registeredDrivers and the sql.Drivers()
loop when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7cc5b123-3f36-4c03-9bb4-06317f2d3fe1

📥 Commits

Reviewing files that changed from the base of the PR and between b2cf821 and aa544af.

📒 Files selected for processing (2)
  • service/entityresolution/multi-strategy/providers/sql/sql_config.go
  • service/entityresolution/multi-strategy/providers/sql/sql_provider.go

Signed-off-by: jp-ayyappan <jp@as2max.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 180.85678ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 102.498089ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 415.998591ms
Throughput 240.39 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 44.441521128s
Average Latency 442.596709ms
Throughput 112.51 requests/second

…ider.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
service/entityresolution/multi-strategy/providers/sql/sql_provider.go (1)

68-77: ⚠️ Potential issue | 🔴 Critical

Fix duplicate NewProvider in sql_provider.go (blocks compilation).

service/entityresolution/multi-strategy/providers/sql/sql_provider.go defines NewProvider twice (at lines 68 and 73), causing a Go syntax error. The first version normalizes with strings.TrimSpace, while the second does not.

Suggested fix
 // NewProvider creates a new SQL provider
 func NewProvider(ctx context.Context, name string, config Config) (*Provider, error) {
 	// Normalize the driver name so "Postgres", "POSTGRES", and "postgres" all
 	// resolve correctly through ensureDriverRegistered and sql.Open, both of
 	// which use case-sensitive driver name matching.
 	config.Driver = strings.ToLower(strings.TrimSpace(config.Driver))
-func NewProvider(ctx context.Context, name string, config Config) (*Provider, error) {
-	config.Driver = strings.ToLower(config.Driver)
 	// Register the database/sql driver for this provider's configured driver name
 	// if it has not already been registered.
 	ensureDriverRegistered(config.Driver)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@service/entityresolution/multi-strategy/providers/sql/sql_provider.go` around
lines 68 - 77, There are two duplicate NewProvider function definitions causing
a compile error; remove the duplicate and keep a single NewProvider
implementation that normalizes config.Driver with strings.TrimSpace and
strings.ToLower, then calls ensureDriverRegistered(config.Driver) and proceeds
as before; specifically, consolidate into one NewProvider (retain the
strings.TrimSpace usage on config.Driver and the ensureDriverRegistered call) so
only one function named NewProvider exists in sql_provider.go.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@service/entityresolution/multi-strategy/providers/sql/sql_provider.go`:
- Around line 68-77: There are two duplicate NewProvider function definitions
causing a compile error; remove the duplicate and keep a single NewProvider
implementation that normalizes config.Driver with strings.TrimSpace and
strings.ToLower, then calls ensureDriverRegistered(config.Driver) and proceeds
as before; specifically, consolidate into one NewProvider (retain the
strings.TrimSpace usage on config.Driver and the ensureDriverRegistered call) so
only one function named NewProvider exists in sql_provider.go.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 064fce66-be87-4ec3-8810-2ff8638fffca

📥 Commits

Reviewing files that changed from the base of the PR and between c0d9847 and c381db9.

📒 Files selected for processing (1)
  • service/entityresolution/multi-strategy/providers/sql/sql_provider.go

Signed-off-by: jp-ayyappan <jp@as2max.com>
@github-actions

Copy link
Copy Markdown
Contributor
Benchmark results, click to expand

Benchmark authorization.GetDecisions Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 148.003842ms

Benchmark authorization.v2.GetMultiResourceDecision Results:

Metric Value
Approved Decision Requests 1000
Denied Decision Requests 0
Total Time 76.488023ms

Benchmark Statistics

Name № Requests Avg Duration Min Duration Max Duration

Bulk Benchmark Results

Metric Value
Total Decrypts 100
Successful Decrypts 100
Failed Decrypts 0
Total Time 406.310583ms
Throughput 246.12 requests/second

TDF3 Benchmark Results:

Metric Value
Total Requests 5000
Successful Requests 5000
Failed Requests 0
Concurrent Requests 50
Total Time 40.709347633s
Average Latency 405.829946ms
Throughput 122.82 requests/second

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Govulncheck found vulnerabilities ⚠️

The following modules have known vulnerabilities:

  • examples
  • otdfctl
  • sdk
  • service
  • lib/fixtures
  • tests-bdd

See the workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multi-strategy ERS SQL provider should register its own database/sql driver

1 participant