Daniel Nephin
be83c11fb0
Add canonical import comment
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
William Martin
782c3f08db
Fix non thread-safe Iteration around go-patricia
...
* Unlike other methods in truncindex, Iterate was not locking before
using the Trie, making it potentially race e.g. Delete could result in
setting a child to nil, while Iterate dereferenced that node
while walking the Trie.
Signed-off-by: Petar Petrov <pppepito86@gmail.com >
Upstream-commit: 57dada53382106952d287dd1f16773e08213ae8d
Component: engine
2017-01-09 17:06:50 +00:00
unclejack
f9eb0e420f
pkg: return directly without ifs where possible
...
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com >
Upstream-commit: 418e6123834def872edef06972c16d97b4cbc542
Component: engine
2016-12-13 22:10:11 +02:00
Antonio Murdaca
24be9013fa
pkg: truncindex: provide more info in error
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com >
Upstream-commit: ae1002219bc5d602c552ba952bc45e440cf3aae7
Component: engine
2016-03-17 15:53:12 +01:00
Alexander Morozov
b92bac632d
Do not rely on string comparison in truncindex
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
Upstream-commit: d4a8d09d1a7ced5c711fcc7a939986d22a0554eb
Component: engine
2015-11-04 11:34:05 -08:00
Antonio Murdaca
433291e005
graph: add parent img refcount for faster rmi
...
also fix a typo in pkg/truncindex package comment
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com >
Upstream-commit: 292a1564dca2f32b9158a6886fadee1cc184f987
Component: engine
2015-10-07 19:09:44 +02:00
David Calavera
df2916dab1
Remove read index that causes dead lock.
...
Let the iterator to lock the index when it needs it.
Signed-off-by: David Calavera <david.calavera@gmail.com >
Upstream-commit: 5ed84009b33642ca1f1eac8b99001842d93e2494
Component: engine
2015-07-31 13:53:17 -07:00
Doug Davis
8e069cb4e8
Add missing typed error in truncindex
...
Signed-off-by: Doug Davis <dug@us.ibm.com >
Upstream-commit: 18b13813358f9cb9f3028f34f59ed254bd16bb3f
Component: engine
2015-07-30 07:52:34 -07:00
Vincent Demeester
2db54e3ac2
Lint on pkg/* packages
...
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
Upstream-commit: 18c7c67308bd4a24a41028e63c2603bb74eac85e
Component: engine
2015-07-27 21:26:21 +02:00
Roman Strashkin
017d6047d5
added ability to iterate over all indexes and use index.Iterate() instead of ReadDir() to walk over the graph
...
Signed-off-by: Roman Strashkin <roman.strashkin@gmail.com >
Upstream-commit: cc955ae73c8aa234e0c41bdb65f111be79b32b90
Component: engine
2015-07-07 22:13:28 +03:00
Tianon Gravi
ba5fba5a8d
Update go-patricia to 2.1.0
...
This includes a fix for the minor v2 API change introduced by https://github.com/tchap/go-patricia/commit/341a37095fea62f400f449e4ec0192702d6e019e . 👍
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com >
Upstream-commit: b447fef7ecb740bc0f9ece75e10926fc5f121b5c
Component: engine
2015-05-02 23:25:57 -06:00
Andrew C. Bodine
685b876322
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
...
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com >
Upstream-commit: d25a65375c880017ac0c516389b0b7afde810517
Component: engine
2015-01-21 17:11:31 -08:00
Álex González
2de641d7f5
Log when truncindex.Get returns >1 container
...
When the user is not using the full has to retrieve a container it's
possible that we find conflicts with the ids of other containers.
At the moment it's just failing saying that it can not find a container,
but it doesn't say why. Adding a small log saying that duplicates where
found is going to help the user.
Closes #8098
Signed-off-by: Alex Gonzalez <agonzalezro@gmail.com >
Upstream-commit: be27d97118764db994fbaf3632225a691c7418fb
Component: engine
2014-12-13 17:43:05 +00:00
unclejack
85977c7e75
pkg/truncindex: lint and add comments
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com > (github: unclejack)
Upstream-commit: 39fe2a3e4e059c4235f2e1692e240058fccc0ea3
Component: engine
2014-10-06 22:00:58 +03:00
LK4D4
4a9952978a
Increase patricia.MaxPrefixPerNode
...
It allows to avoid redundant prefix splits
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com > (github: LK4D4)
Upstream-commit: 095cb7a81800512b99474aec7245bddddd1b2278
Component: engine
2014-06-28 12:27:44 +04:00
unclejack
55be9bc370
refactor TruncIndex to use a trie & vendor deps
...
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com > (github: unclejack)
Upstream-commit: e0dad305791a7406cf819a27fa5a079a46a62acc
Component: engine
2014-06-26 16:57:54 +03:00
LK4D4
1ce22444ec
Move truncindex in separate package in pkg/
...
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com > (github: LK4D4)
Upstream-commit: ed032ddfd68a8654671a13d676c0f7539e36a10b
Component: engine
2014-06-24 21:19:15 +04:00