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

Fix issue when we got 401 from etcd #31

Merged
merged 1 commit into from
Nov 13, 2015
Merged

Fix issue when we got 401 from etcd #31

merged 1 commit into from
Nov 13, 2015

Conversation

nati
Copy link
Contributor

@nati nati commented Nov 9, 2015

Closes: issue #30

Etcd can hold up to 1000 history, so we need to handle this case
correctly.
We have following issues.

(1) We should clone env for each extension run by sync
(2) sync.Watch API keep blocking even if we get 401.
(3) Stop lock per resource
In case we have more than 1000 resources, sync process do infinite
loop because it increases etcd index by lock.

In this commit, we fix these issues, and we added simple integration
test configuraion file.

@yudai
Copy link
Contributor

yudai commented Nov 9, 2015

LGTM

@MaciekPytel
Copy link

In case of index cleared error shouldn't there be a diff between sync and db state versions to run extensions for resources with changed state version (but not for other resources)?

@nati
Copy link
Contributor Author

nati commented Nov 10, 2015

I believe we can't ensure anything in case of index cleared error because we may face
out-of-sync + index cleared same time.
We need full sync in that case also

Closes: issue #30

Etcd can hold up to 1000 history, so we need to handle this case
correctly.
We have following issues.

(1) We should clone env for each extension run by sync
(2) sync.Watch API keep blocking even if we get 401.
(3) Stop lock per resource
  In case we have more than 1000 resources, sync process do infinite
  loop because it increases etcd index by lock.
(4) sync packages is using thread-unsafe map

In this commit, we fix these issues,  and we added simple integration
test configuraion file.
nati added a commit that referenced this pull request Nov 13, 2015
Fix issue when we got 401 from etcd
@nati nati merged commit 8f97dc4 into cloudwan:master Nov 13, 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.

3 participants