Flash removal never decrements the query map entry count
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
Research direction
Start with src/sys/session/flash.c:55-74 and src/sys/session/flash.c:164-175, where single removal and pop-all leave the count unchanged. Find the existing flash tests and add checks for counts after each operation and repeated set/remove cycles on an empty map. Done when removals keep the count accurate and empty-map reuse does not cause unnecessary bucket-array growth.
Written by the indexing model from the issue text.
Description
Affected: dev at bb2a33946.
cwist_flash_get() unlinks and frees a bucket but never decrements req->flash->count (src/sys/session/flash.c:55-74). cwist_flash_pop_all_json() clears every bucket at src/sys/session/flash.c:164-175 and also leaves count unchanged.
Reproduced: after one set/get cycle, count_after_get=1; after serializing and clearing another entry, count_after_pop=2.
The stale count makes later inserts believe the map is populated. Repeated set/remove cycles can trigger unnecessary bucket-array growth even though the map is empty.
Expected: decrement count on single removal and reset it to zero after pop-all, then add tests for counts and repeated empty-map reuse.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 4h 28m
- Merged PRs (30d)
- 191
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c4punks/CWIST
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kmod-project/kmod#492 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/sipnet#435 · 1 comment ·
Maintainers usually reply within 2 days
-
SDL_GPU Vulkan: wrong screen orientation on OpenHarmony (preTransform set without pre-rotation)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
libsdl-org/SDL#16670 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day