[Bug] Fix Document.Get behavior to send unary gRPC request instead of setting up a Listen stream for Document updates
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- cpp, grpc
- Ambito
- backend-api-design, databases
Direzione di ricerca
Inizia in firestore/src/main/document_reference_main.cc, in DocumentReferenceInternal::Get, e segui l’implementazione dell’API Firestore referenziata. Verifica come vengono selezionati GetDocument e il percorso Listen, quindi verifica che Get() utilizzi una richiesta unaria e restituisca ancora il primo DocumentSnapshot previsto senza aprire uno stream Listen.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[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();
}
- Lingua principale
- C++
- Stelle
- 326
- Fork
- 138
- Merge medio
- 1g 22h
- PR unite (30g)
- 6
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-cpp-sdk
-
[FR] Support desktop Linux on aarch64/arm (#error Unknown Linux architecture in app_common.cc)Apertanew type: question
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
firebase/firebase-cpp-sdk#1926 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
firebase/firebase-cpp-sdk#1905 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
api: firestore
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
firebase/firebase-cpp-sdk#1920 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
firebase/firebase-cpp-sdk#1904 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
new type: question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
firebase/firebase-cpp-sdk#1892 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di firebase/firebase-cpp-sdk
Issue simili
-
category:port-update
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
tensorflow/tflite-micro#3784 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tenstorrent/tt-metal#57946 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aristocratos/btop#1857 ·
I maintainer di solito rispondono entro 3 giorni