Skip to content

Commit

Permalink
swarm/api: traces around trie getEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Mar 15, 2018
1 parent a23a9d8 commit a9c10ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions swarm/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ type ErrResolve error
// DNS Resolver
func (self *Api) Resolve(uri *URI) (storage.Key, error) {
apiResolveCount.Inc(1)
log.Trace(fmt.Sprintf("Resolving : %v", uri.Addr))
log.Trace("resolving", "uri", uri.Addr)

// if the URI is immutable, check if the address is a hash
isHash := hashMatcher.MatchString(uri.Addr)
Expand Down Expand Up @@ -308,7 +308,7 @@ func (self *Api) Put(content, contentType string) (k storage.Key, wait func(), e
// to resolve basePath to content using dpa retrieve
// it returns a section reader, mimeType, status and an error
func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionReader, mimeType string, status int, err error) {
log.Debug("api.get", "key", key)
log.Debug("api.get", "key", key, "path", path)
apiGetCount.Inc(1)
trie, err := loadManifest(self.dpa, key, nil)
if err != nil {
Expand All @@ -318,8 +318,9 @@ func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionRe
return
}

log.Trace("trie.getentry", "key", key, "path", path)
log.Trace("trie getting entry", "key", key, "path", path)
entry, _ := trie.getEntry(path)
log.Trace("trie got entry", "key", key, "path", path)

if entry != nil {
// we want to be able to serve Mutable Resource Updates transparently using the bzz:// scheme
Expand Down
1 change: 0 additions & 1 deletion swarm/api/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ func (self *manifestTrie) listWithPrefix(prefix string, quitC chan bool, cb func
}

func (self *manifestTrie) findPrefixOf(path string, quitC chan bool) (entry *manifestTrieEntry, pos int) {

log.Trace(fmt.Sprintf("findPrefixOf(%s)", path))

if len(path) == 0 {
Expand Down

0 comments on commit a9c10ef

Please sign in to comment.