summaryrefslogtreecommitdiffstats
path: root/streaming/sender.c
AgeCommit message (Collapse)Author
2021-01-18add `_is_k8s_node` label to the host labels (#10501)Ilya Mashchenko
* auto format system-info.sh * detect whether the node is k8s node in system-info.sh * fix unmae=>uname * add_is_k8s_node_to_host_labels: Add new variable to structure * add_is_k8s_node_to_host_labels: Add is_k8_node to labels * add_is_k8s_node_to_host_labels: Add is_k8_node inside endpoint * add_is_k8s_node_to_host_labels: Add data to swagge file * change yes/no to true/false * Update web/api/netdata-swagger.json * add_is_k8s_node_to_host_labels: Add anonymous statistic * add_is_k8s_node_to_host_labels: Add information to using-host-labels.md * add_is_k8s_node_to_host_labels: Add variable to stream * add_is_k8s_node_to_host_labels: Change swagger.yaml * add_is_k8s_node_to_host_labels: Adding missing documentation * add_is_k8s_node_to_host_labels: rename variable * add_is_k8s_node_to_host_labels: Rename lables to match variable names * add_is_k8s_node_to_host_labels: Add to wget * add_is_k8s_node_to_host_labels: Add content to swagger files * add_is_k8s_node_to_host_labels: update both swagger files * add_is_k8s_node_to_host_labels: fix wrong exportation Co-authored-by: Thiago Marques <thiagoftsm@gmail.com>
2020-12-14Kubernetes labels (#10107)Ilya Mashchenko
Co-authored-by: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com> Co-authored-by: Vladimir Kobal <vlad@prokk.net>
2020-11-16Fix streaming buffer size (#10240)Vladimir Kobal
* Fix send buffer size * Fix formatting
2020-10-20Replace memcpy() with memmove() for overlapping memory ranges. (#10097)Markos Fountoulakis
2020-08-27fixes proxy forwarding claim_id to old parent (#9828)Timotej S
when v3 child reloads claim state while connected to v3 proxy the proxy forwarded it to parent despite it being v2
2020-08-26Adds claimed_id streaming (#9804)Timotej S
* streams claimed_id of child nodes to parents * adds this information into /api/v1/info
2020-08-11Remove broken optimization in the sender thread (#9703)Andrew Moss
The sender thread avoided locking the circular buffer to check if there was outstanding data on the connection. The condition it needs (unsent data) grows monotonically w.r.t. other threads as the collectors can add data but only this thread can remove it. However, it cached the pointer into the buffer as a side-effect and then reused it later during the transmission. This fails if the buffer is resized by a collector thread. Peeking at the buffer sizes without locking could fail in the same situation. The optimization is removed and the sender thread now locks the mutex before checking the buffer, throws away the data buffer pointer and releases the mutex over the poll() operation. It then reacquires the mutex and checks the buffer size and data pointer again when it performs the send.
2020-06-22Fixed concurrency bug in health sending HOST VARIABLE to receiver (#9396)thiagoftsm
The recent changes to the streaming component wipe the send buffer when the mutex is acquired to prevent stale data and expose concurrency bugs. The callback from health was called from another thread to write into the stream buffer without any protection. This protects the access to the buffer.
2020-06-12Change streaming terminology to parent-child in the code (#9323)Andrew Moss
2020-06-04Fix Coverity defects 359164, 359165 and 358989. (#9268)Andrew Moss
Removed uses of the host lock that could deadlock senders and replaced with the new fine-grained mutex.
2020-06-03Fix bugs in streaming and enable support for gap filling (#9214)Andrew Moss
This PR adds (inactive) support that we will use to fill the gaps on chart when a receiving agent goes offline and the sender reconnects. The streaming component has been reworked to make the connection bi-directional and fix several outstanding bugs in the area. * Fixed an incorrect case of version negotiation. Removed fatal() on exhaustion of fds. * Fixed cases that fell through to polling the socket after closing. * Fixed locking of data related to sender and receiver in the host structure. * Added fine-grained locks to reduce contention. * Added circular buffer to sender to prevent starvation in high-latency conditions. * Fixed case where agent is a proxy and negotiated different streaming versions with sender and receiver. * Changed interface to new parser to put the buffering code in streaming. * Fixed the bug that stopped senders from reconnecting after their socket times out - this was part of the scaling fixes that provide an early shortcut path for rejecting connections without lock contention. * Uses fine-grained locking and a different approach to thread shutdown instead. * Added liveness detection to connections to allow selection of the best connection.