Commit 0f30065
committed
MB-67175: Add termination reason to log description
Extend the description with the termination reason if it is
set:
2025-10-16T11:13:31.741832+02:00 INFO Removing connection
{"conn_id":925,
"bucket":"travel-sample",
"dcp":"producer",
"dcp_name":"eq_dcpq:DCPT:INIT_309d2c13b63794168603c93e5ee53d84:travel-sample:inventory:airline:11100504861856972217:##4:3",
"description":{
"peer":{
"ip":"127.0.0.1",
"port":44664},
"socket":{
"ip":"127.0.0.1",
"port":11210},
"termination_reason":"Client closed connection: EOF",
"user":{
"name":"@Projector",
"system":true}}}
Previously the description was set when the connection was created and
only updated as part of authentication (and in those contexts it
wouldn't be used from other threads). DCP connections will log the
description from other threads than the connections front end thread
so with this change we need to protect the data with a lock.
Change-Id: I2fd4d730bbf55d42696d994fa3ba89d1422299c4
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/235358
Tested-by: Trond Norbye <[email protected]>
Reviewed-by: Jim Walker <[email protected]>1 parent b973936 commit 0f30065
File tree
6 files changed
+25
-17
lines changed- daemon
- include
- memcached
- test
- programs/engine_testapp
6 files changed
+25
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
455 | 459 | | |
456 | 460 | | |
457 | 461 | | |
| |||
1340 | 1344 | | |
1341 | 1345 | | |
1342 | 1346 | | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1343 | 1350 | | |
1344 | 1351 | | |
1345 | 1352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
1098 | 1101 | | |
1099 | 1102 | | |
1100 | 1103 | | |
1101 | | - | |
| 1104 | + | |
1102 | 1105 | | |
1103 | 1106 | | |
1104 | 1107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments