Skip to content

Instantly share code, notes, and snippets.

@suma
Last active December 14, 2015 01:59
Show Gist options
  • Select an option

  • Save suma/5010751 to your computer and use it in GitHub Desktop.

Select an option

Save suma/5010751 to your computer and use it in GitHub Desktop.
Jubatus向け pficommonバージョンアップ追随メモ

Jubatus向け pficommonバージョンアップ追随メモ 2013/02/22

概要・目的

  • Jubatusのpficomonのバージョンアップをするか、しないかの判断材料を集める

  • セキュリティフィックスの有無

  • 依存モジュールにバグ修正・改善点などがあるか

  • 結論

  • バージョンアップしてよい、したほうがよい

  • 現在Jubatusの設定ファイルにハイパーパラメータの値を記述しているが、JSONで指定した浮動小数点が誤差のある状態で指定される可能性がある(要検証)

比較、主な変更点

  • 比較対象

  • Jubatusでの推奨バージョン: 8fde51454af897cc971bab9033e217ff83b12f78 (2012-12-12)

  • pficommon HEAD: 4e34ef44b61b40a1eab37879487f9145549b7b10 (2013-2-18)

  • 修正概要(Jubatusに関連する部分は説明をやや増し増し)

  • jsonで巨大な数値の読み込み(パース)が可能になること

  • 以前は、数値のパースでオーバーフロー・アンダーフローが発生したり、浮動小数点で誤差が発生する可能性があった。ただし、今回の修正によってパース時に数値がオーバーフロー・アンダーフローした時パースエラーが発生するようになった。

  • jsonがunordered_mapになること(jsonオブジェクトから文字列変換時には注意すること)

  • デシリアライザの改善(パフォーマンス)

  • 細かなインタフェース修正

commit log

新しいものから古い順に。

4e34ef44b61b40a1eab37879487f9145549b7b10 Reformat json_parser::parser_number
410dc4c4d9e737b04bfc64ae3de6ca60c82f1268 Fix json_parser to reset errno
6a75adab11b8a0229a54163a0017507e15889a27 Added json test for parsing invalid number
d8114372fbe6f2b7c503086f94792a0ce3d35024 Reformat json_parser::parser_number
bb28e1135126661fa8a9b79896fa594028a0fb1c Merge pull request #136 from tkng/json-parse-bignumber
1b514960560a96898099f77b752fef79615aab29 Use strtod/strtoll for parsing numbers in json parser class.
c6fc0fcd55c3e5bec78957fb171993a67161aff9 Merge pull request #133 from ntsuji/fix-typo
309fe0be7dc86b172e4c7627a26a768725287e8a Fix trivial typo
9320b2029fdaa9e593e72e4164e1b6075435fd1d Added test for pfi::network::uri::authority().
a73b049a412d5608031b4d9c552ce8dee60cbaee Added test for pfi::network::uri's output operator.
8fcbc32ec228c27e0a24eee3ced3d5f7def579d3 Added test for class pfi::network::uri.
61f3d6a206c14025d098e96799bfa82daee84b13 Merge pull request #120 from pepshiso/uri
9ea02132b11d43b265d3ec44c53591874a1e6e4a Merge pull request #130 from pepshiso/waf17
d7fffe9ef29045f2e50cbd20cdd61a63a2055e15 Merge pull request #132 from pepshiso/mmapper-swap
4e9b5621397ac2e62d03f66bb72dc270a160c389 Added inline to a specialization of swap to avaid multiple definitions
f5b70eb90222c1f41ad7a9cd2c934d9f7f0a5935 Added test which confirm that uri encode functions do not percent-encode digits.
6e70c98d5a2c12153490986648a6c09cd8c90f08 Replaced waf 1.6.7 with 1.7.8.
e388d73f75fdd1215c669a773344dce612884ad5 Modified wscripts for waf 1.7.8.
e675073a61d06714e3bb5bc615065cb02779eb2b Merge pull request #126 from pepshiso/function-object
f4d1d16c44ee73aaa94746d14e9ef8531a139d10 Merge pull request #129 from pepshiso/wextra
7a573b889f735992aecc6d4e9c8f837117432fba Merge pull request #127 from pepshiso/catch
1a1bfc262cbf9a3e773931dab425755d036caa4a Merge pull request #125 from pepshiso/enum-comma
57e43abbe36c089c2b45a2e657e36b68b3446c3a Merge pull request #124 from pepshiso/ustring
21bf93054d6692d34287c00179d25dcc31df8038 Removed unused parameter names.
98d8d510ebf62fd1e3ba750b99c9db2c6fa0f958 Refined exception-declaration.
71c2941c1639a03f5bb858737ed497aab683bf2d Replaced a member function with a function object.
cad789e407edbf68e2e9a489d79d537a866f6f4b Removed last comma in mprpc::sql_type.
9a649292bdf62cb7f210277024b78b739265c44e Removed last comma in sql_type.
d8aa0d5c62d2128167a61054cefb24f0316258b1 Removed trailing comma of an enumerator-list.
9aedf17c7e9bbb78faf1d980fa6f2cc04e4e165f Fixed constructor forwarding from ustring to std::basic_string.
9ea02132b11d43b265d3ec44c53591874a1e6e4a Merge pull request #130 from pepshiso/waf17
d7fffe9ef29045f2e50cbd20cdd61a63a2055e15 Merge pull request #132 from pepshiso/mmapper-swap
4e9b5621397ac2e62d03f66bb72dc270a160c389 Added inline to a specialization of swap to avaid multiple definitions
f5b70eb90222c1f41ad7a9cd2c934d9f7f0a5935 Added test which confirm that uri encode functions do not percent-encode digits.
6e70c98d5a2c12153490986648a6c09cd8c90f08 Replaced waf 1.6.7 with 1.7.8.
e388d73f75fdd1215c669a773344dce612884ad5 Modified wscripts for waf 1.7.8.
e675073a61d06714e3bb5bc615065cb02779eb2b Merge pull request #126 from pepshiso/function-object
f4d1d16c44ee73aaa94746d14e9ef8531a139d10 Merge pull request #129 from pepshiso/wextra
7a573b889f735992aecc6d4e9c8f837117432fba Merge pull request #127 from pepshiso/catch
1a1bfc262cbf9a3e773931dab425755d036caa4a Merge pull request #125 from pepshiso/enum-comma
57e43abbe36c089c2b45a2e657e36b68b3446c3a Merge pull request #124 from pepshiso/ustring
21bf93054d6692d34287c00179d25dcc31df8038 Removed unused parameter names.
98d8d510ebf62fd1e3ba750b99c9db2c6fa0f958 Refined exception-declaration.
71c2941c1639a03f5bb858737ed497aab683bf2d Replaced a member function with a function object.
cad789e407edbf68e2e9a489d79d537a866f6f4b Removed last comma in mprpc::sql_type.
9a649292bdf62cb7f210277024b78b739265c44e Removed last comma in sql_type.
d8aa0d5c62d2128167a61054cefb24f0316258b1 Removed trailing comma of an enumerator-list.
9aedf17c7e9bbb78faf1d980fa6f2cc04e4e165f Fixed constructor forwarding from ustring to std::basic_string.
5f1155e505f245b094a345428203c3e0ff68dfb1 Merge pull request #123 from pepshiso/bad_weak_ptr
f288c73454423a149dc95d6c0184e0791fe21249 Made bad_weak_ptr to derive std::exception as public base.
9480d272f9a9dfbb7446b4c622553186ce12ffec Added test for network::uri_decode().
b675339bbdd056f62e80042b1c48dfb6975e49d7 Fixed network::uri_encode() not to encode unreserved characters.
570b23d85eeaa7ec3d09e175b986d0269e6b174e Added test for network::uri_encode().
70073d5d7a70f0e48546e7055c2706d613942178 Merge branch 'pepshiso/enable_if'
0258b749415e01f9b2d721320e06ddf4ea32a1dc Merge branch 'pepshiso/ipv4_address'
81c3684a3e3b643a86734513c568934824da443d Improved test cases for ipv4_address
cbc5341a918ee67fb8635aeb138384a7d388cc59 Merge branch 'pepshiso/chars_to_uchar'
d2d15adf7bab093937df0b6964a08aaae1df0f5d Merge branch 'constant'
9d7af5f43612d1c5cd8abb654b78abfc75a2e59a Merge pull request #117 from pepshiso/system-file-explicit
876947e1e6f3264166695032110f7c15c4784c09 Merge pull request #116 from pepshiso/backslash
7cbe1b2ec46ccb20e663570cdaa8e9284135f6ed Merge pull request #109 from pepshiso/serialization
3cac11484257b810fc821421e1e683e55762c87a Added explicit to fd_stream's constructor.
85b906fa477088db397af615417fa48bad5a6d35 Removed unnecessary backslashes.
8b803e6618aec8900f1807c864906976af593299 Removed unnecessary bacslash.
3aeccf556e1de1ff92126727887fd1e56373f528 Added test for ipv4_address.
760adf6c06198062e261b319c44d48d2a7be49a6 Merge pull request #112 from pepshiso/uchar-uint32_t
685e07e9ec4e5025b123a05d71c4113dcb12bd8e Merge pull request #108 from pepshiso/json-bad_cast
dd449380bcf944a7b26f99c5707b71c1d62161a0 Merge pull request #107 from pepshiso/json-unordered
f57092a7ddd6ed0cadac7b3110238df015d1ab83 Moved implementations of ipv4_address from ipv4.cpp to ipv4.h.
82958150523bd344f73aa78803647f44c7faf1a8 Corrected an index.
3601bbb1e801e01f77aa91339654a645155db16a Removed #include  in ipv4.cpp.
ae11ab6e3be2cf2eba10953e298734cd2478ed12 Removed const from ipv4_address::to_string()'s return value type.
e70b92468efe5b42133021ae9664ac4398672920 Modified ipv4::address::to_string()'s implementation.
b0cfad0c25e3f620aa9ae0bee0b50cb70df3e361 Modified ipv4_address::operator<()'s implementation.
f47c3b9fdd77bf35bfba8fd7dfd72a2cd20ca176 Modified ipv4_address::operator==()'s implementation.
c570ee14d7166fcd984e94e20a1d6cb8c260373c Modified ipv4_address::ipv4_address(const string&)'s implementation.
6ea4699ef407775ca3e60631d3fab062c0696d0f Simplified impv_address's default constructor.
eb4ed04ac8bb26cdfb083bbd32437df62b9c913c Removed ipv4_address's user-defined destructor.
c165442cb42084571b9d3730d50aced043018601 Removed ipv4_address's user-defined copy constructor.
33835fabcc857dc2b082f7d3f1e71a44e4752032 Modified copyright notice in ipv4.
0dc98ac7c63844a25304778bcafb52203332dccb Fixed indentation in ipv4_address.
03228d1184126c421433d590685ccfd6b2c7d315 Modified chars_to_uchar() not to treat five-octet or six-octet sequences as UTF-8.
2eb03a5edcc6244168344b60e17789eac35325a0 Fixed indentation in math/constant.h.
f5f3cf1135416a0163aec2478f1205541d4401ff Changed copyright year.
8683ccb1db6d9a1db265f071e9202ac0007b74d5 Removed pfi::math::unoptimized().
3a7f978d442fcc406362bf2fd2563021b0b8b6c8 Made one-argument chars_to_uchar() deprecated.
60cd115624bb05f38d59227c9cba5d2c940a4c64 Replaced use of one-argument chars_to_uchar() with two-argument chars_to_uchar().
ca5bd02d6c80959cb045bf9d5d9029bd389e1baa Added two argument chars_to_uchar().
81f2a2f39cffe3db5b83610650361ae72f2c87e3 Replaced asserts with throwing exceptions.
ad4d8fe50ae49a4d795ff6ea1fce8b7430e6dbfd Fixed indentation in ustring.h.
22176b2bb891fbe14059a376557edb5ef0903e8b Made uchar uint32_t.
132530815d65270b79341f60352252f1afd764cb Removed tabs.
5dcd54eec1c5b78d7e072ee06973e4c4fca89662 Added test for (o|i)archive::bool_test().
ce262564b7c624333e00750037b0f194a00fa970 Separated construction of exception message in json/cast.h.
78bcb8efcdef30ee6cb0549366258d48c239d1c9 Removed an unneccesary semicolon.
99c5156007349953dcc951561ad127ab581e196f Added spaces for indentation.
a0305c4acb30df3b71cee6a57a28d1030a0932fc Added return *this.
9a29be21ea817d765c726ad79c1deeb2b55591ce Removed serialize() parameter's unneccesary reference.
9c70968f3239dcb1923ba8c86ddb8822a3318d52 Replaced template specialization of serialize() with function overloading.
dec32a9bae0cbc1dab3ed1424028c87273ab6e47 Improved implementation of binary_oarchive::write().
332b289e3da0cdfa63b9b519893316977b415179 Replaced template specialization with function overloading.
5634c9e987a1c0b72f5768541a79eb75cf6ddca3 Improved implementation of binary_iarchive::read()
92a5c4f5130a07b5a5f37df38a9d5ebe1af0a5b5 Cleaned code in data/serialization.h.
955533d3b085e0a2aa0c98bba4071f6479edc97f Simplified code throwing json_bad_cast.
03c04e3c640e228b9b9b5d2ff004cf820e9b45d8 Made json to use unordered_map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment