Raúl Marín
b269f87f4c
Better text_log with ErrnoException
2023-12-15 19:27:56 +01:00
Alexey Milovidov
d29092f8af
Merge pull request #54909 from canhld94/revert-54893-revert-54819-ch_net_interfaces
...
Resubmit: Avoid excessive calls to getifaddrs in isLocalAddress
2023-11-25 23:00:18 +01:00
Duc Canh Le
2ce527364d
remove unnecessary headers
2023-09-27 18:21:15 +08:00
Duc Canh Le
15fe392fed
no update network_interfaces
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-09-27 10:19:02 +00:00
JackyWoo
5da03e8ba5
Add load balancing test_hostname_levenshtein_distance
2023-09-27 10:46:39 +08:00
Duc Canh Le
3b48b5aa5e
extend lifetime of returned network interface object
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-09-22 05:25:32 +00:00
Duc Canh Le
7883ae0d8c
Revert "Revert "Avoid excessive calls to getifaddrs in isLocalAddress""
2023-09-22 13:22:35 +08:00
Igor Nikonov
8610baabef
Revert "Avoid excessive calls to getifaddrs in isLocalAddress"
2023-09-21 15:57:47 +02:00
Duc Canh Le
2901eab8cc
avoid race condition on last_updated_time
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-09-21 03:45:37 +00:00
Duc Canh Le
1200e03f20
correctly implement swap
2023-09-20 18:51:31 +08:00
JackyWoo
f81f0b6e3d
Use levenshteinDistance for neareast hostname load balancer
2023-09-20 17:42:25 +08:00
Duc Canh Le
e6a3f3ed01
get rid of unique pointer
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-09-20 09:31:03 +00:00
Duc Canh Le
5ace2a15db
Update src/Common/isLocalAddress.cpp
...
Co-authored-by: Igor Nikonov <954088+devcrafter@users.noreply.github.com>
2023-09-20 16:46:32 +08:00
Duc Canh Le
074ee40e3b
avoid excessive calls to getifaddrs
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-09-20 06:55:39 +00:00
Ivan Takarlikov
8873856ce5
Fix some grammar mistakes in documentation, code and tests
2023-05-04 13:35:18 -03:00
Alexander Tokmakov
3cca5fb181
minor fixes
2022-03-21 15:55:01 +01:00
Alexey Milovidov
fe6b7c77c7
Rename "common" to "base"
2021-10-02 10:13:14 +03:00
Alexey Milovidov
ee247aaa5b
Simplify code
2021-05-21 08:21:37 +03:00
Alexey Milovidov
ccc19f1201
Simplify code
2021-05-21 08:21:19 +03:00
Alexey Milovidov
87a7133659
Add a test and fix the code
2021-05-21 08:19:08 +03:00
Alexey Milovidov
b553c5a117
Recognize more addresses as local
2021-05-21 08:19:08 +03:00
Alexey Milovidov
335dafe887
Revert "Minor change"
...
This reverts commit db9f68fced
.
2021-05-20 01:16:43 +03:00
Alexey Milovidov
db9f68fced
Minor change
2021-05-20 01:16:11 +03:00
Azat Khuzhin
92632bf0c1
Fix isLocalAddress() (ifa_addr maybe NULL)
...
From getifaddrs(3):
The ifa_addr field points to a structure containing the interface
address. (The sa_family subfield should be consulted to
determine the format of the address structure.) This field may
contain a null pointer.
I have the problem with tun0, that creates points-to-point address, so
getifaddrs() returns NULL ifa_addr for one of addrs for tun0.
You can check this, using this simple example - [1].
[1]: https://gist.github.com/azat/cc667d145bc74215c40cdbb69f38189b
2021-05-20 00:04:11 +03:00
alesapin
6127ba901e
Small improvements
2021-05-17 19:29:11 +03:00
alesapin
acaf260a2e
Better
2021-05-17 19:18:38 +03:00
alesapin
b4f07a017c
Space
2021-05-17 18:32:34 +03:00
alesapin
5a0d0a1717
Much simplier isLocalAddress
2021-05-17 18:31:44 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build ( #14809 )
2020-09-15 12:55:57 +03:00
Ivan Lezhankin
06446b4f08
dbms/ → src/
2020-04-03 18:14:31 +03:00