Upgrading to 9.0.0 breaks indexes for fields which contain an underscore when using indexeddb adapter
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- databases
Línea de trabajo
Comienza ejecutando la reproducción indicada con pouchdb-adapter-indexeddb 8.0.1 y 9.0.0; después, inspecciona cómo se almacenan y consultan los campos indexados que contienen guiones bajos. Compara la ruta de actualización con los índices recién creados; se considera terminado cuando los índices existentes siguen devolviendo documentos actualizados sin eliminarse ni recrearse.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 17.6k
- Forks
- 1.5k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/pouchdb
-
elemMatch throws TypeError: value is null if array has null elementPosiblemente ocupada @henyanagar la tomó hace 141 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
unref event is not documentedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Validate database namesAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
Todos los issues de apache/pouchdb
Issues similares
-
bug confirmed js v6
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
BUG
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
linuxmint/cinnamon-spices-applets#9223 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fastify/fastify-swagger-ui#299 ·