Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
be84279
PoC couch_stats local resource usage tracking
chewbranca Jul 18, 2022
e5e4820
Instrument more stats and rudimentary delta accumulation
chewbranca Oct 23, 2023
ecda8f3
Add more usage tracking and core functionality
chewbranca Oct 30, 2023
73863a7
Embed worker usage deltas in rexi:ping
chewbranca Oct 31, 2023
12e0267
WIP: core delta aggregation working
chewbranca Nov 9, 2023
84be4af
TMP: rewire rexi to fail on unexpected messages
chewbranca Nov 10, 2023
19224af
Add baseline group by and sort by aggregations
chewbranca Nov 14, 2023
cafa512
Add watchdog scanning for unmonitored processes
chewbranca Nov 14, 2023
996c385
Set dbname context properly
chewbranca Nov 15, 2023
1bbf7a9
Add unsafe_foldl for perf testing
chewbranca Nov 16, 2023
e70ba4d
Rework csrt context setting
chewbranca Nov 18, 2023
715b524
WIP: ugly but working HTTP API around groupings
chewbranca Nov 18, 2023
be8ab04
Cleanup debug info
chewbranca Nov 20, 2023
4c05a0f
Make CSRT toggle-able and rework delta sending
chewbranca Nov 20, 2023
eb20b5d
Remove debug exit clause
chewbranca Nov 20, 2023
f4a712c
Declare missing metrics
chewbranca Nov 21, 2023
c758cb7
WIP: relax record constraints...
chewbranca Nov 21, 2023
4f00910
Use Default in config:get/3 on ets table error
chewbranca Nov 30, 2023
887a7f2
Switch to delta extraction from messages
chewbranca Nov 30, 2023
1a1a584
Revert "Use Default in config:get/3 on ets table error"
chewbranca Nov 30, 2023
db1f874
Flush chttpd_db monitor refs on demonitor
chewbranca Dec 9, 2023
50495bf
TMP Hack around issue #4909
chewbranca Dec 18, 2023
9578773
Avoid mem3_rpc:rexi_call selective receive
chewbranca Dec 18, 2023
f77583a
Pass tests and toggle csrt
chewbranca Dec 19, 2023
ac17510
Handle delta in fabric rpc tests
chewbranca Dec 19, 2023
c500f0f
Conditionally log reports
chewbranca Dec 19, 2023
d7e9bd9
Do not persist doc size test config settings
chewbranca Jan 5, 2024
f68005a
Configurable logging and no more io_lib:format
chewbranca Jan 8, 2024
0371589
Limit resource usage output and fix keys
chewbranca Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Flush chttpd_db monitor refs on demonitor
This ensures that the coordinator process flushes on demonitoring of the
attachment refs in chttpd_db. The problem here is that it's possible to
receive a 'DOWN' message for the monitor ref that is not receive'ed,
causing it to stick around in the coordinator message queue while the
next http request is handled. The pending message will not become
apparent until the next fabric call is invoked, as fabric expects to
have full access to all messages in the calling process, an expectation
which is violated by the pending message and causes a case clause crash
in the fabric receive message callbacks.

I noticed this during eunit runs with stubbed attachment handles that
generate an immediate noproc message on the monitor call. Normal
operations should not result in an immediate noproc result on monitoring
the attachment process, however, any failure that causes the attachment
process to fail between acquisition of the refs and the demonitor calls
will induce this bug, causing the next http request handled by the
particular chttpd coordinator pool processs to fail on whatever next
fabric call is made.
  • Loading branch information
chewbranca committed Dec 9, 2023
commit db1f8748918df5367b96d3ba85cd2ccfc51b592f
2 changes: 1 addition & 1 deletion src/chttpd/src/chttpd_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,7 @@ monitor_attachments(Att) ->
monitor_attachments([Att]).

demonitor_refs(Refs) when is_list(Refs) ->
[demonitor(Ref) || Ref <- Refs].
[demonitor(Ref, [flush]) || Ref <- Refs].

% Return attachments which are not stubs
non_stubbed_attachments(Atts) when is_list(Atts) ->
Expand Down