Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

*: rework "consolidate excessive Hash/Unit requests" PR #1514

Closed
kayrus opened this issue Mar 22, 2016 · 2 comments
Closed

*: rework "consolidate excessive Hash/Unit requests" PR #1514

kayrus opened this issue Mar 22, 2016 · 2 comments

Comments

@kayrus
Copy link
Contributor

kayrus commented Mar 22, 2016

We have to rework #1376 PR.

Relates to: #1512, #1446

@tixxdz
Copy link
Contributor

tixxdz commented Mar 29, 2016

ping @kayrus if you want to take this one?

kayrus added a commit to endocode/fleet that referenced this issue Mar 29, 2016
@kayrus
Copy link
Contributor Author

kayrus commented Mar 29, 2016

@tixxdz fixed in #1520

kayrus added a commit to endocode/fleet that referenced this issue Mar 29, 2016
kayrus added a commit to endocode/fleet that referenced this issue Mar 29, 2016
@kayrus kayrus self-assigned this Mar 29, 2016
kayrus added a commit to endocode/fleet that referenced this issue Mar 30, 2016
kayrus added a commit to endocode/fleet that referenced this issue Mar 30, 2016
Resolves coreos#1514

The problem was caused by the [code optimization](coreos#1376). Before that each unit was stored in its own variable. Then this code was optimized and units became stored in hash map (`getAllUnitsHashMap`). Each hash was assigned to the unit's pointer. And when template unit was checked by `requirements()` function, its content was modified by `values[i] = unitPrintf(v, *uni)` code. Once templated unit was modified, all related units (which have same hash) were modified too, because they are related to one pointer.
kayrus added a commit to endocode/fleet that referenced this issue Mar 31, 2016
Resolves coreos#1514

The problem was caused by the [code optimization](coreos#1376). Before that each unit was stored in its own variable. Then this code was optimized and units became stored in hash map (`getAllUnitsHashMap`). Each hash was assigned to the unit's pointer. And when template unit was checked by `requirements()` function, its content was modified by `values[i] = unitPrintf(v, *uni)` code. Once templated unit was modified, all related units (which have same hash) were modified too, because they are related to one pointer.
kayrus added a commit to endocode/fleet that referenced this issue Mar 31, 2016
Resolves coreos#1514

The problem was caused by the [code optimization](coreos#1376). Before that each unit was stored in its own variable. Then this code was optimized and units became stored in hash map (`getAllUnitsHashMap`). Each hash was assigned to the unit's pointer. And when template unit was checked by `requirements()` function, its content was modified by `values[i] = unitPrintf(v, *uni)` code. Once templated unit was modified, all related units (which have same hash) were modified too, because they are related to one pointer.
hectorj2f pushed a commit to giantswarm/fleet that referenced this issue Apr 6, 2016
Resolves coreos#1514

The problem was caused by the [code optimization](coreos#1376). Before that each unit was stored in its own variable. Then this code was optimized and units became stored in hash map (`getAllUnitsHashMap`). Each hash was assigned to the unit's pointer. And when template unit was checked by `requirements()` function, its content was modified by `values[i] = unitPrintf(v, *uni)` code. Once templated unit was modified, all related units (which have same hash) were modified too, because they are related to one pointer.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants