]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3068] add comment about code obsolescence
authorAndrei Pavel <andrei@isc.org>
Mon, 2 Oct 2023 14:37:25 +0000 (17:37 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 5 Oct 2023 14:40:02 +0000 (17:40 +0300)
src/lib/cc/data.cc

index 77dfecc1962f649aa7a5bc5e65a2ae1d2f6a0163..56d684d8155fd12f9ef6ef74e4bb4440906775b5 100644 (file)
@@ -501,6 +501,12 @@ numberFromStringstream(std::istream& in, int& pos) {
 // that can also hold an e value? (and have specific getters if the
 // value is larger than an int can handle)
 //
+// At the moment of writing, the only way that the code flow can reach the
+// int128_t cast, and not throw, is by retrieving one of the few bigint
+// statistics through kea-ctrl-agent. If kea-ctrl-agent ever gets removed, and
+// its HTTP listener embeded in Kea, then the cast to int128_t can be removed as
+// well, as there is no deserialization of bigints required, although the only
+// benefit would be better performance for error cases, so it's arguable.
 ElementPtr
 fromStringstreamNumber(std::istream& in, const std::string& file,
                        const int line, int& pos) {