chore(data-structures): low-priority follow-ups from a data-structure review
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
Start with lib/core/database/connection_pool_lock.dart and add tests for concurrent callers, separate keys, and synchronous or asynchronous failures; the issue says the class currently has no tests. Check the three pool implementations for PostgreSQL, MySQL, and SQLite when judging whether re-entrancy matters. Done means the tests establish the intended behavior and _lock is removed or its purpose is documented; the boolean-column and interning ideas are explicitly conditional.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Findings from a review of the data structures, checked against dev. The two that pay off are in #1682 (Redis folder key count, groupings number parsing). What is left is small; each item says whether it is worth doing.
1. PoolEntryLock._lock is never active (worth a test first)
lib/core/database/connection_pool_lock.dart: createIfAbsent sets _lock, runs a block with no await, and clears it in finally in the same turn, so the while (_lock != null) await _lock loop never waits. De-duplication really comes from _pending[key]. The one thing the lock changes is re-entrancy: a call to createIfAbsent made from inside create() waits instead of running at once. The class has no tests and three pools use it (PostgreSQL, MySQL, SQLite).
- Add tests: two callers, one key, one
create(); two keys in parallel; a failingcreate()clears the entry;create()that throws synchronously. - Then drop
_lock(or keep it and say why in the doc comment).
2. BooleanCompactColumn (probably not worth it)
Boolean columns are stored as 0/1 in Int64List (8 bytes per row, about 790 KB per column at 100k rows more than a bit array). A packed column touches formatting, sort, type detection and export. Only do this if a profile shows boolean columns dominating the heap.
3. StringInternPool does not evict
When maxEntries (4096) is reached, new strings are simply not interned. That is the right trade for a bounded pool; an LRU would add bookkeeping to a hot path. Only revisit if results with more than 4096 distinct short values are common.
Considered and rejected
MetricHistory.recordusesremoveRange(0, 1)on a list of at most 120 samples every 5 s: a copy of 120 references. A ring buffer would be more code for no visible gain.GenericCompactColumn.formatterand isolates: noted on #1549, where the isolate hand-off is in scope.
- Linguagem predominante
- Dart
- Estrelas
- 23
- Forks
- 1
- Merge médio
- 32min
- PRs com merge (30d)
- 537
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de QueryaHub/Querya-Desktop
-
enhancement ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
QueryaHub/Querya-Desktop#1689 ·
Mantenedores costumam responder em até 1 dia
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowAbertabug frontend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
QueryaHub/Querya-Desktop#1642 ·
Mantenedores costumam responder em até 1 dia
-
bug error-handling settings
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
QueryaHub/Querya-Desktop#1637 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
QueryaHub/Querya-Desktop#1636 ·
Mantenedores costumam responder em até 1 dia
-
enhancement marketplace
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
QueryaHub/Querya-Desktop#1635 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de QueryaHub/Querya-Desktop
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
jhomlala/betterplayer#1609 ·
Mantenedores costumam responder em até 1 dia
-
[FR] 缓存键放置在外面Abertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
bggRGjQaUbCoE/PiliPlus#3310 ·
Mantenedores costumam responder em até 1 dia
-
package:code_builder type-bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
type:feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
[material_ui] CalendarDatePicker day numbers are cut off with large text scale on narrow screensAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia