dht: make main store a vector<unique_ptr<Storage>> #94

Merged
merged 1 commit into from Jul 22, 2016

Conversation

Projects
None yet
3 participants
@sim590
Contributor

sim590 commented Jul 22, 2016

Since the elements inside are going to be moved constantly during the life of the node, this design is better. Also, it works around a crash when the store is resized (elements inside moved) at some point (always happenned the 3rd time) for some reason. This bug was known when compiled with LLVM >7.3.0 (>clang-703.0.31).

@sim590

This comment has been minimized.

Show comment
Hide comment
@sim590

sim590 Jul 22, 2016

Contributor

I'm linking this issue to Ring's tuleap bug tracker's issue about this: https://tuleap.ring.cx/plugins/tracker/?aid=556

Contributor

sim590 commented Jul 22, 2016

I'm linking this issue to Ring's tuleap bug tracker's issue about this: https://tuleap.ring.cx/plugins/tracker/?aid=556

@kaldoran

This comment has been minimized.

Show comment
Hide comment
@kaldoran

kaldoran Jul 22, 2016

Collaborator

Since Travis does not compile i've tried on my own computer. The following should be fixed:
dht.cpp: In member function ‘dht::NetworkEngine::RequestAnswer dht::Dht::onGetValues(std::shared_ptr<dht::Node>, dht::InfoHash&, dht::want_t, const dht::Query&)’: dht.cpp:2728:15: error: no match for ‘operator!=’ (operand types are ‘std::unique_ptr<dht::Dht::Storage>’ and ‘std::vector<std::unique_ptr<dht::Dht::Storage> >::iterator {aka __gnu_cxx::__normal_iterator<std::unique_ptr<dht::Dht::Storage>*, std::vector<std::unique_ptr<dht::Dht::Storage> > >}’) if ((*st) != store.end() && not (*st)->empty()) {

Collaborator

kaldoran commented Jul 22, 2016

Since Travis does not compile i've tried on my own computer. The following should be fixed:
dht.cpp: In member function ‘dht::NetworkEngine::RequestAnswer dht::Dht::onGetValues(std::shared_ptr<dht::Node>, dht::InfoHash&, dht::want_t, const dht::Query&)’: dht.cpp:2728:15: error: no match for ‘operator!=’ (operand types are ‘std::unique_ptr<dht::Dht::Storage>’ and ‘std::vector<std::unique_ptr<dht::Dht::Storage> >::iterator {aka __gnu_cxx::__normal_iterator<std::unique_ptr<dht::Dht::Storage>*, std::vector<std::unique_ptr<dht::Dht::Storage> > >}’) if ((*st) != store.end() && not (*st)->empty()) {

@sim590

This comment has been minimized.

Show comment
Hide comment
@sim590

sim590 Jul 22, 2016

Contributor

Yes. I did resolve conflicts too quickly. Now it should be fine.

Contributor

sim590 commented Jul 22, 2016

Yes. I did resolve conflicts too quickly. Now it should be fine.

dht: make main store a vector<unique_ptr<Storage>>
Since the elements inside are going to be moved constantly during the life of
the node, this design is better. Also, it works around a crash when the store is
resized (elements inside moved) at some point (always happenned the 3rd time)
for some reason. This bug was known when compiled with LLVM >7.3.0 (>clang-703.0.31).
@kaldoran

This comment has been minimized.

Show comment
Hide comment
@kaldoran

kaldoran Jul 22, 2016

Collaborator

Seems ok now that compile on my computer. I'll merge

Collaborator

kaldoran commented Jul 22, 2016

Seems ok now that compile on my computer. I'll merge

@kaldoran kaldoran merged commit 2362db8 into savoirfairelinux:master Jul 22, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment