Copilot commented on code in PR #13245:
URL: https://github.com/apache/trafficserver/pull/13245#discussion_r3375270408
##########
src/iocore/cache/CacheDir.cc:
##########
@@ -260,7 +260,7 @@ Directory::bucket_length(Dir *b, int s)
int i = 0;
Dir *seg = this->get_segment(s);
#ifdef LOOP_CHECK_MODE
- if (dir_bucket_loop_fix(b, s, this))
+ if (this->bucket_loop_fix(b, s, this))
return 1;
#endif
Review Comment:
`Directory::bucket_loop_fix` now takes only `(Dir*, int)`, but this call
still passes a third argument (`this`). This will fail to compile when
`LOOP_CHECK_MODE` is enabled.
##########
src/iocore/cache/CacheDir.cc:
##########
@@ -357,7 +308,7 @@ dir_clean_bucket(Dir *b, int s, StripeSM *stripe)
#ifdef LOOP_CHECK_MODE
loop_count++;
if (loop_count > DIR_LOOP_THRESHOLD) {
- if (dir_bucket_loop_fix(b, s, vol->directory))
+ if (vol->directory.bucket_loop_fix(b, s))
return;
Review Comment:
Inside `dir_clean_bucket`, the updated loop-fix call references
`vol->directory`, but there is no `vol` variable in this scope (and the
function already has `StripeSM *stripe`). This will not compile when
`LOOP_CHECK_MODE` is enabled.
##########
src/iocore/cache/CacheDir.cc:
##########
@@ -733,7 +684,7 @@ Directory::remove(const CacheKey *key, StripeSM *stripe,
Dir *del)
#ifdef LOOP_CHECK_MODE
loop_count++;
if (loop_count > DIR_LOOP_THRESHOLD) {
- if (dir_bucket_loop_fix(dir_bucket(b, seg), s, this))
+ if (this->bucket_loop_fix(dir_bucket(b, seg), s, this))
return 0;
Review Comment:
`Directory::bucket_loop_fix` now takes only `(Dir*, int)`, but this call in
`Directory::remove` still passes a third argument (`this`). This will fail to
compile when `LOOP_CHECK_MODE` is enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]