Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

backport gh 25544 #25633

Merged
merged 1 commit into from
Jul 22, 2020
Merged

backport gh 25544 #25633

merged 1 commit into from
Jul 22, 2020

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Jul 21, 2020

This backports #25544, but is not a direct cherry-pick of the commit due
to significant changes in the types between 0.12 and 0.13.

The AbstractResourceInstance type was storing the entire Resource from
the state, when it only needs the actual instance state. This would
cause resources to consume memory on the order of n^2, where n is the
number of instances of the resource.

Rather than attaching the entire resource state, which includes copying
each individual instance, only attach the ResourceInstance state, and
extract out the provider address from the Resource.

The AbstractResourceInstance type was storing the entire Resource from
the state, when it only needs the actual instance state. This would
cause resources to consume memory on the order of n^2, where n is the
number of instances of the resource.

Rather than attaching the entire resource state, which includes copying
each individual instance, only attach the ResourceInstance state, and
extract out the provider address from the Resource.
@jbardin jbardin added the v0.12 Issues (primarily bugs) reported against v0.12 releases label Jul 21, 2020
@jbardin jbardin requested a review from a team July 21, 2020 19:36
@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #25633 into v0.12 will decrease coverage by 0.00%.
The diff coverage is 67.85%.

Impacted Files Coverage Δ
terraform/node_resource_refresh.go 87.17% <50.00%> (ø)
terraform/node_resource_abstract.go 78.16% <68.00%> (-1.84%) ⬇️
terraform/node_resource_destroy.go 91.08% <100.00%> (-0.26%) ⬇️
dag/marshal.go 71.57% <0.00%> (-0.51%) ⬇️
states/statefile/version4.go 54.73% <0.00%> (-0.26%) ⬇️

@jbardin jbardin merged commit f8680fa into v0.12 Jul 22, 2020
@ghost
Copy link

ghost commented Aug 22, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 22, 2020
@jbardin jbardin deleted the jbardin/backport-gh-25544 branch November 20, 2020 20:07
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants