googleapis / googleapis/google-cloud-node
Support optimistic transactions as an option
- Lingua principale
- TypeScript
- Stelle
- 3.2k
- Fork
- 713
- Merge medio
- 2g 9h
- PR unite (30g)
- 104
Descrizione
**Is your feature request related to a problem? Please describe.**
I found that for some usage patterns optimistic transactions would work better than pessimistic.
**Describe the solution you'd like**
I'd like to pass an option to `runTransaction` which would allow me to choose if pessimistic or optimistic transactions should be used.
**Describe alternatives you've considered**
There are workarounds for it, like manually fetching documents, checking preconditions, then starting a transaction and reading the documents again, but I find it unnecessarily verbose and having an optimistic transaction would make my code simpler.
**Additional context**
None.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando l’implementazione di runTransaction e i test delle transazioni esistenti. Leggi come vengono attualmente selezionate le modalità di transazione, quindi definisci il comportamento atteso dell’opzione e verifica che i chiamanti possano scegliere transazioni ottimistiche o pessimistiche senza il workaround esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- google-cloud, nodejs, typescript
- Ambito
- databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100