Skip to content

Commit

Permalink
Yolo to stage (#392)
Browse files Browse the repository at this point in the history
* Add stat for fresh dir

* Dev propfind add parent calls (#390)

* Fix names of stats
  • Loading branch information
jerryblakley authored Sep 26, 2017
1 parent 99ee368 commit 83d1fd0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/filecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ static void get_fresh_fd(filecache_t *cache,
g_set_error(gerr, filecache_quark(), ENOENT, "%s: File %s expected to exist returns 404-partial file transfer.",
funcname, path);
} else {
g_set_error(gerr, filecache_quark(), ENOENT, "%s: File %s expected to exist returns %d.",
g_set_error(gerr, filecache_quark(), ENOENT, "%s: File %s expected to exist returns %ld.",
funcname, path, response_code);
}
/* we get a 404 because the stat_cache returned that the file existed, but it
Expand Down
1 change: 1 addition & 0 deletions src/fusedav.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ static void get_stat(const char *path, struct stat *stbuf, GError **gerr) {
if (!config->refresh_dir_for_file_stat || is_base_directory) {
GError *subgerr = NULL;
log_print(LOG_INFO, SECTION_FUSEDAV_STAT, "Performing zero-depth PROPFIND on path: %s", path);
stats_counter_local("propfind-root", 1);
ret = simple_propfind_with_redirect(path, PROPFIND_DEPTH_ZERO, 0, getattr_propfind_callback, NULL, &subgerr);
if (subgerr) {
// Delete from cache on error; ignore errors from stat_cache_delete since we already have one
Expand Down
4 changes: 3 additions & 1 deletion src/statcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,11 @@ struct stat_cache_value *stat_cache_value_get(stat_cache_t *cache, const char *p
free(value);
stats_counter("statcache_stale", 1);
return NULL;
} else {
stats_counter("statcache_fresh_dir", 1);
}
} else {
stats_counter("statcache_fresh", 1);
stats_counter("statcache_fresh_file", 1);
}
}

Expand Down

0 comments on commit 83d1fd0

Please sign in to comment.