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

Allocate a new taskBatch for each batch of tasks in the WorkerManager #136

Merged
merged 1 commit into from
Jul 17, 2015
Merged

Allocate a new taskBatch for each batch of tasks in the WorkerManager #136

merged 1 commit into from
Jul 17, 2015

Conversation

spenczar
Copy link
Contributor

#131 never releases the memory it allocates for taskBatches. Memory grows without bound, so processes using go_kafka_client will quickly run out of memory and die on HEAD right now.

Previously, we got around this by shrinking currentBatch - it was a map and we deleted entries. To avoid contention, we don't deleteEntries anymore, but we need to free up memory by dereferencing the taskBatch and allocating a new one.

@serejja
Copy link
Contributor

serejja commented Jul 17, 2015

Hi @spenczar, thanks for fixing this, I'll accept it once #138 finishes on Travis. It looks like golang/snappy made backwards incompatible package name change (ugh..) and I had to bump Sarama version to include that change. You may also update your PR to include #138 but I suppose we may safely merge it without waiting it to build another time.

serejja added a commit that referenced this pull request Jul 17, 2015
Allocate a new taskBatch for each batch of tasks in the WorkerManager
@serejja serejja merged commit 41834bc into elodina:master Jul 17, 2015
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.

None yet

2 participants