Skip to content

update #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
962dc73
Merge pull request #9 from keywolf/master
WLBF Oct 25, 2018
0a263c3
Merge pull request #10 from keywolf/master
WLBF Oct 27, 2018
21f6c11
add threadpool
WLBF Oct 26, 2018
78002ce
limit thread pool task queue size
WLBF Oct 27, 2018
6f58cfe
add transaction filter
WLBF Oct 27, 2018
258fb3f
notify all if thread pool task queue too large
WLBF Oct 28, 2018
74af9c7
change `create` to `index` action_trace transaction_trace
WLBF Oct 28, 2018
2a04143
Merge pull request #11 from EOSLaoMao/feature/thread-pool-task-queue-…
WLBF Oct 28, 2018
ece35a1
Update README.md
WLBF Oct 29, 2018
b22964e
remove notify_all
WLBF Oct 30, 2018
c79a878
fix misspelling `createAt`
WLBF Oct 31, 2018
9b9b868
cache all abi information in the ram
WLBF Nov 2, 2018
8061238
update README.md
WLBF Nov 3, 2018
56f2996
async upsert account index
WLBF Nov 4, 2018
59dceca
Merge pull request #12 from EOSLaoMao/feature/cache-all-abi
WLBF Nov 5, 2018
2484c08
store action_trace act.data as string
WLBF Nov 9, 2018
1dfde56
set max_task_queue_size to 16 times max_queue_size
WLBF Nov 9, 2018
4a86b62
use global sequence id as action trace id
WLBF Nov 12, 2018
5fc053d
max http request timeout
WLBF Nov 14, 2018
c07a4f9
Merge pull request #13 from EOSLaoMao/feature/sequence-as-action-trac…
WLBF Nov 14, 2018
1ee29e1
store abi def in chainbase
WLBF Dec 11, 2018
6cef6e9
Update README.md
datudou Dec 12, 2018
5b37da8
Update README.md
datudou Dec 12, 2018
78b3576
Update README.md
datudou Dec 12, 2018
3ae32e9
increase abi database size
WLBF Dec 21, 2018
c49c746
change blocks and block_states document structure
WLBF Dec 13, 2018
d8faa52
change command line options
WLBF Dec 22, 2018
ce47524
change elasticsearch indices init
WLBF Dec 23, 2018
d593384
update readme
WLBF Dec 24, 2018
a9b63e4
Merge pull request #15 from EOSLaoMao/feature/block-structure-change
WLBF Jan 7, 2019
acc7bc8
add blog
WLBF Jan 7, 2019
0c65047
Update set-up-an-elasticsearch-cluster-stores-eos-blockchain-data.md
WLBF Jan 8, 2019
86ec957
transaction_metadata change
WLBF Jan 22, 2019
6c621bf
Merge pull request #17 from EOSLaoMao/release/1.6.x
WLBF Jan 25, 2019
23d8677
implement customize index name feature
WLBF Feb 8, 2019
95ef68a
Merge pull request #18 from EOSLaoMao/feature/customize-index-name
WLBF Feb 8, 2019
0a55b70
fix store-action-traces-arg effect transaction-traces issue
WLBF Mar 5, 2019
e3bebf6
Merge pull request #19 from EOSLaoMao/issue/store-action-traces-arg
WLBF Mar 5, 2019
90385ab
fit eosio release 1.7.x
WLBF Jun 4, 2019
d42ef39
Merge pull request #21 from EOSLaoMao/release/1.7.x
WLBF Jun 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ThreadPool"]
path = ThreadPool
url = https://github.com/EOSLaoMao/ThreadPool.git
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ file(GLOB HEADERS "include/eosio/elasticsearch_plugin/*.hpp")
add_library( elasticsearch_plugin
elasticsearch_plugin.cpp
elastic_client.cpp
deserializer.cpp
bulker.cpp
${HEADERS} )

Expand Down
359 changes: 307 additions & 52 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ThreadPool
Submodule ThreadPool added at 8320d9
16 changes: 9 additions & 7 deletions benchmark/benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

| Replay 10000 Block | elapse(s) | speed(b/s) |
| -------------------- |:---------:|:----------:|
| elasticsearch_plugin | 548 | 18.25 |
| elasticsearch_plugin | 266 | 37.59 |
| mongo_db_plugin | 694 | 14.41 |

| Replay 100000 Block | elapse(s) | speed(b/s) |
| -------------------- |:---------:|:----------:|
| elasticsearch_plugin | 663 | 150.83 |
| elasticsearch_plugin | 354 | 282.49 |
| mongo_db_plugin | 987 | 101.32 |

## Hardware
Expand All @@ -28,16 +28,18 @@ The MongoDB and Elasticsearch are both running in the docker container with basi
### Command-line

```bash
./build/programs/nodeos/nodeos --data-dir=dev_config/data \
--config-dir=dev_config \
./build/programs/nodeos/nodeos \
--data-dir=data \
--config-dir=config \
--abi-serializer-max-time-ms=1000000 \
--replay-blockchain \
--elastic-url=http://localhost:9200/ \
--elastic-queue-size=512 \
--elastic-abi-cache-size=8192 \
--elastic-index-wipe

./build/programs/nodeos/nodeos --data-dir=dev_config/data \
--config-dir=dev_config \
./build/programs/nodeos/nodeos \
--data-dir=data \
--config-dir=config \
--replay-blockchain \
--mongodb-uri=mongodb://root:example@localhost:27017/eos?authSource=admin \
--mongodb-queue-size=512 \
Expand Down
6 changes: 3 additions & 3 deletions bulker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bulker_pool::bulker_pool(size_t size, size_t bulk_size,
const std::string &user, const std::string &password): pool_size(size), bulk_size(bulk_size)
{
for (int i = 0; i < pool_size; ++i) {
bulker_vec.emplace_back( new bulker(bulk_size, url_list, user, password) );
bulkers.emplace_back( new bulker(bulk_size, url_list, user, password) );
}
}

Expand All @@ -69,12 +69,12 @@ bulker& bulker_pool::get() {

size_t cur_idx = index % pool_size;

auto ptr = bulker_vec[cur_idx].get();
auto ptr = bulkers[cur_idx].get();

if ( ptr->size() >= bulk_size ) {
cur_idx = (cur_idx + 1) % pool_size;
index = cur_idx;
return *bulker_vec[cur_idx].get();
return *bulkers[cur_idx].get();
} else {
return *ptr;
}
Expand Down
2 changes: 1 addition & 1 deletion bulker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class bulker_pool
bulker& get();

private:
std::vector<std::unique_ptr<bulker>> bulker_vec;
std::vector<std::unique_ptr<bulker>> bulkers;
size_t pool_size;
size_t bulk_size;
std::atomic<size_t> index {0};
Expand Down
118 changes: 0 additions & 118 deletions deserializer.cpp

This file was deleted.

61 changes: 0 additions & 61 deletions deserializer.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion elastic_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class elastic_client
{
public:
elastic_client(const std::vector<std::string> url_list, const std::string &user, const std::string &password)
:client(url_list, user, password, 100000) {};
:client(url_list, user, password, std::numeric_limits<int32_t>::max()) {};

void delete_index(const std::string &index_name);
void init_index(const std::string &index_name, const std::string &mappings);
Expand Down
Loading