Skip to content
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

[RPC] Refactored sessions. #181

Merged
merged 4 commits into from
Mar 30, 2015
Merged

[RPC] Refactored sessions. #181

merged 4 commits into from
Mar 30, 2015

Conversation

kobolog
Copy link
Member

@kobolog kobolog commented Mar 29, 2015

Trello: https://trello.com/c/95HRjhQa

  • Sessions no longer depend on boost::signals2. The shutdown signal wasn't required in the first place, since under highload system will reuse fds fast enough to replace stale sessions in the engine's map, and for quiet times engines will now garbage collect stale sessions every 60 seconds.
  • Sessions now log stuff. That means improvements over uncaught_error without any details about what error was not actually caught.
  • Much more predictable dispatch discard policy. Note that discard() call may or may not be accompanied by std::error_code.

@kobolog
Copy link
Member Author

kobolog commented Mar 29, 2015

@3Hren @antmat: review away! Travis is failing because GH is under DDOS, btw.

auto it = mapping.find(channel_id);

// NOTE: Not sure if that can ever happen, but that's why people use asserts, right?
BOOST_ASSERT(it != mapping.end());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always disable asserts for some reasons. I suggest to drop this check https:/cocaine/cocaine-core/blob/v0.12/include/cocaine/common.hpp#L36

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, let's keep it. I'd rather suggest make it on for CMAKE_BUILD_TYPE=Debug by default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do it in a separate PR, since you know CMake better than me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, someday =)

Andrey Sibiryov and others added 2 commits March 30, 2015 11:58
* Sessions no longer depend on `boost::signals2`. The shutdown signal
  wasn't required in the first place, since under highload system will
  reuse fds fast enough to replace stale sessions in the engine's map,
  and for quiet times engines will now garbage collect stale sessions
  every 60 seconds.
* Sessions now log stuff. That means improvements over `uncaught_error`
  without any details about what error was not actually caught.
* Much more predictable dispatch discard policy. Note that `discard()`
  call may or may not be accompanied by `std::error_code`.
kobolog pushed a commit that referenced this pull request Mar 30, 2015
@kobolog kobolog merged commit 11b7bb3 into master Mar 30, 2015
@kobolog kobolog deleted the kobolog/refactor-sessions branch March 30, 2015 18:31
antmat pushed a commit to antmat/cocaine-core that referenced this pull request Jun 19, 2017
This commit adds additional bind method to the trace implementation
that wraps the given function directly without intermediate `std::bind`.
3Hren added a commit that referenced this pull request Aug 18, 2017
This commit adds additional bind method to the trace implementation
that wraps the given function directly without intermediate `std::bind`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants