[Bug] Fix Document.Get behavior to send unary gRPC request instead of setting up a Listen stream for Document updates
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cpp, grpc
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
Bắt đầu tại firestore/src/main/document_reference_main.cc, ở DocumentReferenceInternal::Get, và lần theo phần triển khai API Firestore được tham chiếu. Xác nhận cách GetDocument và đường dẫn Listen được chọn, sau đó kiểm tra rằng Get() sử dụng một yêu cầu unary và vẫn trả về DocumentSnapshot đầu tiên như mong đợi mà không mở một luồng Listen.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website or open-source from this repo: _____
- Firebase C++ SDK version: unity-v11.8.0 onwards
- Problematic Firebase Component: Firestore Database API
- Other Firebase Components in use: N/A
- Platform you are using the C++ SDK on: Linux (but exists on all platforms)
- Platform you are targeting: desktop
[REQUIRED] Please describe the issue here:
The Firestore C++ Mobile SDK API implementation for DocumentReference.Get() is sub-optimal. Instead a sending a single gRPC request for Firestore.GetDocument, it opens a Firestore.Listen stream to listen for DocumentSnapshots and serves the first snapshot as response to the Get() call.
At minimum, this has latency impact - cost of setting up and tearing down a Listen stream is higher and using it to only read first version of the DocumentSnapshot, the cost is not amortized. Arguably, this may even be construed as incorrect behavior if one were to look at the network messages generated by these calls by this implementation as it deviates from the intent of the Firestore API.
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?
What's the issue repro rate? (eg 100%, 1/5 etc)
100%. Using the DocumentReference.Get() API.
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
// Get should send a unary RPC - not a Streaming Listen RPC
Future<DocumentSnapshot> DocumentReferenceInternal::Get(Source source) {
auto promise =
promise_factory_.CreatePromise<DocumentSnapshot>(AsyncApis::kGet);
auto listener = ListenerWithPromise<api::DocumentSnapshot>(promise);
reference_.GetDocument(ToCoreApi(source), std::move(listener));
return promise.future();
}
- Ngôn ngữ chính
- C++
- Star
- 326
- Fork
- 138
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-cpp-sdk
-
[FR] Support desktop Linux on aarch64/arm (#error Unknown Linux architecture in app_common.cc)Đang mởnew type: question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
firebase/firebase-cpp-sdk#1926 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
firebase/firebase-cpp-sdk#1905 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api: firestore
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
firebase/firebase-cpp-sdk#1920 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
firebase/firebase-cpp-sdk#1904 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
new type: question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/firebase-cpp-sdk#1892 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-cpp-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hyprwm/aquamarine#426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Winget hash mismatch for 5.0.3.0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
amnezia-vpn/amnezia-client#3222 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sdatkinson/NeuralAmpModelerCore#342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
valkey-io/valkey-search#1465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
KhronosGroup/Vulkan-Tutorial#524 ·
Maintainer thường phản hồi trong vòng 1 ngày