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

best effort writer never releases cache changes #39

Closed
liamstask opened this issue Apr 27, 2016 · 5 comments
Closed

best effort writer never releases cache changes #39

liamstask opened this issue Apr 27, 2016 · 5 comments

Comments

@liamstask
Copy link
Contributor

publisher config:

PublisherAttributes pub_attr;
    pub_attr.topic.topicKind = NO_KEY;
    pub_attr.topic.topicName = TopicData::topic_name;
    pub_attr.topic.topicDataType = TopicData::topic_type;
    pub_attr.topic.historyQos.kind = KEEP_LAST_HISTORY_QOS;
    pub_attr.topic.historyQos.depth = 1;
    pub_attr.topic.resourceLimitsQos.max_samples = 1;
    pub_attr.topic.resourceLimitsQos.allocated_samples = 50;
    pub_attr.times.heartbeatPeriod.seconds = 0;
    pub_attr.times.heartbeatPeriod.fraction = 4294967 * 100; // ~100 millis
    pub_attr.qos.m_reliability.kind = BEST_EFFORT_RELIABILITY_QOS;

subscriber config:

SubscriberAttributes sub_attr;
    sub_attr.topic.topicKind = NO_KEY;
    sub_attr.topic.topicName = TopicData::topic_name;
    sub_attr.topic.topicDataType = TopicData::topic_type;
    sub_attr.topic.historyQos.kind = KEEP_LAST_HISTORY_QOS;
    sub_attr.topic.historyQos.depth = 1;
    sub_attr.times.heartbeatResponseDelay.seconds = 0;
    sub_attr.times.heartbeatResponseDelay.fraction = 4294967 * 50; // ~50 millis;
    sub_attr.topic.resourceLimitsQos.max_samples = 1;
    sub_attr.topic.resourceLimitsQos.allocated_samples = 5;
    sub_attr.qos.m_reliability.kind = BEST_EFFORT_RELIABILITY_QOS;

After 50 samples (i.e. allocated_samples for the publisher) are written through the publisher, all subsequent writes fail and I see the following messages logged:

[Warning][CacheChangePool::allocateGroup]           Maximum number of allowed reserved caches reached
[Warning][RTPSWriter::new_change]                   Problem reserving Cache from the History

I never see CacheChangePool::release_Cache() called for this writer.

I have a local change to StatelessWriter::clean_history() to return true (per #34) to allow the writer to even attempt writing in the first place.

@liamstask
Copy link
Contributor Author

One fix for this is to edit History::remove_all_changes() as described in #40 and call it from StatelessWriter::clean_history().

@SantiagoMunoz
Copy link
Contributor

SantiagoMunoz commented Jun 14, 2016

Hello @liamstask
Thanks pointing that out! I've been looking into the issue but it seems that fixing that mutating vector you discovered plus some of the work we have been putting in this month has solved it. In any case, I've also added a test to make sure and we will keep an eye on this just in case.

@liamstask
Copy link
Contributor Author

@SantiagoMunoz - great! Has this fix already been pushed?

@SantiagoMunoz
Copy link
Contributor

@liamstask We are aiming to release a new version in the next few days, I will keep you updated :)

SantiagoMunoz added a commit that referenced this issue Jun 20, 2016
… Prior fixes seem to have solved this issue
@SantiagoMunoz
Copy link
Contributor

New version is available on master. Cheers!

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

No branches or pull requests

2 participants