Skip to content

fix: speed up gRPC search result conversion by reading payload Values… - #1514

Open
joein wants to merge 1 commit into
devfrom
perf/grpc-to-payload
Open

joein wants to merge 1 commit into
devfrom
perf/grpc-to-payload

Conversation

@joein

@joein joein commented Sep 30, 2026

Copy link
Copy Markdown
Member

dev

@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 1555ef4
🔍 Latest deploy log https://app.netlify.com/projects/poetic-froyo-8baba7/deploys/6abcf051bd5ef100086db44b
😎 Deploy Preview https://deploy-preview-1514--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 32440fae-6734-48f7-995e-ce82a327d6c2

📥 Commits

Reviewing files that changed from the base of the PR and between 260c12f and 1555ef4.

📒 Files selected for processing (2)
  • qdrant_client/conversions/conversion.py
  • tests/conversions/test_validate_conversions.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The conversion code now reads protobuf Value oneof fields directly and recursively converts scalar, list, and struct values. It preserves non-finite doubles as strings and raises ValueError for unsupported values. Payload conversion now uses map-key lookup, and scored-point conversion includes a payload only when the map is nonempty. Tests cover scalar edge cases, nested and empty containers, and empty or populated point payloads.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: 2sumtech

Merge Risk: ⚪ Minimal · up to 1555e

The faster conversion preserves existing value and payload behavior. No actionable merge-blocking issue remains; run the normal test suite before merging.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 1555e

The reviewed response-conversion paths preserve payload representations and empty-payload behavior without adding privileges, writes, or authorization bypasses. No material security risk was found to be introduced or worsened.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Influence through returned payload values remains confined, in the inspected paths, to client-side result conversion and its returned data or conversion exceptions. No new credential access, tenant authority, storage mutation, or deployment authority is added.

Trust Boundaries and Controls

  • observed — The removed has_field helper only checked protobuf field presence. Replacing its payload-map use with a length check does not remove authentication, authorization, identity validation, or payload-policy enforcement. Existing presence checks for other scored-point fields remain.
🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is only “dev,” so it does not provide meaningful information about the conversion changes. Replace “dev” with a brief description of the direct protobuf Value conversion and the resulting gRPC search result performance improvement.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: speeding up gRPC search result conversion by reading payload Values directly.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

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