fix(scheduler): downgrade routine EEXIST resync log, dedup hash_string

xce_core_push_events() WARNed on every JOBS_PUSH resync redelivery
(sched_add_job rc=-EEXIST), which is the expected outcome under
on_scheduler_join()'s full resync or the array-push dedup race
(bug-1734/bug-1714) and flooded operational logs. Only that case now
logs via a new DBG() macro (utils.h); any other add_rc (e.g. -ENOMEM)
still WARNs. DBG is named to avoid colliding with the build's own
-DDEBUG command-line define (debug/asan buildtypes).

Also collapsed hash_string()'s duplicated djb2 loop to delegate to
hash_block(), which already implements the same RUN_HASH loop.

Logged as bug-1809 in .wolf/buglog.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
Rongsong Shen 2026-09-15 02:46:52 +00:00
parent 868c6427c8
commit b7250c2ec6
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
7 changed files with 115 additions and 19 deletions

View file

@ -141,6 +141,12 @@
#define TRACE(...) tlog_debug3(__VA_ARGS__)
/* Named DBG, not DEBUG -- DEBUG is a bare command-line macro (-DDEBUG,
* src/meson.build) defined for both the debug and asan buildtypes, so
* `#define DEBUG(...)` here would trigger a "DEBUG redefined" warning in
* every translation unit that includes this header under either profile. */
#define DBG(...) tlog_debug(__VA_ARGS__)
#define INFO(...) tlog_info(__VA_ARGS__)
#define ERROR(...) tlog_error(__VA_ARGS__)