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

Fixes an init race condition #93

Merged
merged 5 commits into from
May 21, 2019
Merged

Fixes an init race condition #93

merged 5 commits into from
May 21, 2019

Commits on May 20, 2019

  1. This could probably be a race condition, for ex: When we've create a …

    …subscriber in the API, and the subscriber has the data already available in the callback (Cause of existing publishers) the db entry for the particular topic would not be availalble, which in turn returns an SqliteException. This is cause write_->create_topic() call is where we add the db entry for a particular topic. And, this leads to crashing before any recording.
    
    Locally I solved it by adding the db entry first, and if
    create_subscription fails, remove the topic entry from the db and also
    erase the subscription.
    
    Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>
    Sriram Raghunathan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    d1c6c81 View commit details
    Browse the repository at this point in the history
  2. Fix comments for pull request ros2#93

    Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>
    Sriram Raghunathan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    7f9ddd2 View commit details
    Browse the repository at this point in the history
  3. Added unit test case for remove_topics from db

    Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>
    Sriram Raghunathan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    98591e7 View commit details
    Browse the repository at this point in the history
  4. Fix unit tests failing by adding dependent test macros

    Signed-off-by: Sriram Raghunathan <rsriram7@visteon.com>
    Sriram Raghunathan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    8804882 View commit details
    Browse the repository at this point in the history
  5. Fixes the linter errors

    Sriram Raghunathan committed May 20, 2019
    Configuration menu
    Copy the full SHA
    c388d8e View commit details
    Browse the repository at this point in the history