Upgrading to 9.0.0 breaks indexes for fields which contain an underscore when using indexeddb adapter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- databases
Direzione di ricerca
Inizia eseguendo la riproduzione indicata con pouchdb-adapter-indexeddb 8.0.1 e 9.0.0, quindi esamina come vengono archiviati e interrogati i campi indicizzati contenenti underscore. Confronta il percorso di aggiornamento con gli indici appena creati; il lavoro è completato quando gli indici esistenti continuano a restituire documenti aggiornati senza essere eliminati e ricreati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Versions
We're using the following modules. These were in version 7.2.2 and we updated them to 9.0.0.
- pouchdb
- pouchdb-adapter-indexeddb
- pouchdb-browser
- pouchdb-find
- pouchdb-selector-core
The problem only appears to be with the version of pouchdb-adapter-indexeddb module. The versions of the other modules do not affect this. I've also tested upgrading everything to 9.0.0 except this adapter (which i kept to version 7.2.2 once and 8.0.1 the 2nd time i tested it), and the problem below didn't happen.
Issue
After the update to version 9.0.0, every time a document is updated or created, it is not being returned to the search results of some indexes.
We have an index of 2 fields which contain an underscore (WGS_Latitude, WGS_Longitude) and it does not contain the new documents. If we drop and recreate the index after the update, the exact opposite will happen; the updated documents will be returned but not the old ones.
After inspecting indexeddb I saw that every underscore in every field which contained one, was replaced by "c95". The fields appeared normally when fetching docs with db.get().
Example before:
Example after:
Workaround
If the indexeddb is deleted and replicated again from the remote db, everything appears to be working normally (might not an option for some cases).
Info
- Environment: ReactJS and Capacitor
- Platform: Chrome, Android Capacitor App
- Adapter: indexeddb
- Server: pouchdb-server
Reproduce
- Create a new pouchdb using pouchdb-adapter-indexeddb 8.0.1 or 7.2.2 (other versions haven't been tested).
- Create some documents with a field which contains an underscore
- Create an index with that field
- Upgrade to pouchdb-adapter-indexeddb 9.0.0
- Update a doc and try to fetch it with the created index
- Lingua principale
- JavaScript
- Stelle
- 17.6k
- Fork
- 1.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 apache/pouchdb
-
elemMatch throws TypeError: value is null if array has null elementForse già presa @henyanagar l’ha presa 144 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Validate database namesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
Tutte le issue di apache/pouchdb
Issue simili
-
test-reliability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/azure-sdk-for-js#40672 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
txn2/mcp-data-platform#2492 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
liberation-data/drivine#639 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prophet-technocracy/civilizational-emergency-protocol#59 ·
I maintainer di solito rispondono entro 1 giorno
-
type: bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
RocketChat/Rocket.Chat#43554 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno