Problem with obsolete changeset in `FindCommits`
This was just brought to my attention by @pacien:
[2022-05-23 10:12:46 +0000] [1449862] [ERROR] [grpc._server] Exception iterating responses: hidden revision 'c9dee86707c5' was rewritten as: 4ccc138be201
Traceback (most recent call last):
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/scmutil.py", line 654, in revsymbol
node = resolvehexnodeidprefix(repo, symbol)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/scmutil.py", line 498, in resolvehexnodeidprefix
repo.changelog.rev(node) # make sure node isn't filtered
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/repoview.py", line 335, in rev
raise error.FilteredLookupError(
mercurial.error.FilteredLookupError: 00changelog@c9dee86707c55b61c43d60521b9af3345b1cfb4c: filtered node
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/logcmdutil.py", line 946, in revrange
return scmutil.revrange(repo, specs, localalias)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/scmutil.py", line 769, in revrange
return repo.anyrevs(allspecs, user=True, localalias=localalias)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/localrepo.py", line 2026, in anyrevs
return m(self)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 2800, in mfunc
return getset(repo, subset, tree, order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 113, in getset
return methods[x[0]](repo, subset, *x[1:], order=order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 365, in func
return func(repo, subset, b, order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 2327, in reverse
l = getset(repo, subset, x, order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 113, in getset
return methods[x[0]](repo, subset, *x[1:], order=order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 366, in func
return func(repo, subset, b)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 482, in ancestors
return _ancestors(
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 448, in _ancestors
heads = getset(repo, fullreposet(repo), x)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 113, in getset
return methods[x[0]](repo, subset, *x[1:], order=order)
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/revset.py", line 137, in stringset
x = scmutil.intrev(scmutil.revsymbol(repo, x))
File "/home/hg/venv/lib/python3.9/site-packages/mercurial/scmutil.py", line 668, in revsymbol
raise _filterederror(repo, symbol)
mercurial.error.FilteredRepoLookupError: b"hidden revision 'c9dee86707c5' was rewritten as: 4ccc138be201"
Corresponding JSON error log in the Rails app:
{"severity":"ERROR","time":"2022-05-23T09:47:39.006Z","correlation_id":"01G3R50D77FG9TWMYX48AD596G","exception.class":"Gitlab::Git::CommandTimedOut","exception.message":"4:Deadline Exceeded.","exception.backtrace":["lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'","lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'","lib/gitlab/git/commit.rb:205:in `batch_by_oid'","lib/gitlab/git/rugged_impl/commit.rb:53:in `batch_by_oid'","app/models/repository.rb:154:in `commits_by'","app/models/commit.rb:136:in `block (2 levels) in lazy'","app/models/commit.rb:133:in `each'","app/models/commit.rb:133:in `block in lazy'","lib/gitlab/json.rb:122:in `dump'","lib/gitlab/json.rb:122:in `adapter_dump'","lib/gitlab/json.rb:46:in `dump'","lib/gitlab/json.rb:198:in `call'","lib/api/api_guard.rb:213:in `call'","lib/gitlab/middleware/memory_report.rb:13:in `call'","lib/gitlab/middleware/speedscope.rb:13:in `call'","lib/gitlab/request_profiler/middleware.rb:17:in `call'","lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'","lib/gitlab/jira/middleware.rb:19:in `call'","lib/gitlab/middleware/go.rb:20:in `call'","lib/gitlab/etag_caching/middleware.rb:21:in `call'","lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'","lib/gitlab/database/query_analyzer.rb:46:in `within'","lib/gitlab/middleware/query_analyzer.rb:11:in `call'","lib/gitlab/middleware/multipart.rb:173:in `call'","lib/gitlab/middleware/read_only/controller.rb:50:in `call'","lib/gitlab/middleware/read_only.rb:18:in `call'","lib/gitlab/middleware/same_site_cookies.rb:27:in `call'","lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'","lib/gitlab/middleware/basic_health_check.rb:25:in `call'","lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'","lib/gitlab/middleware/request_context.rb:21:in `call'","lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'","config/initializers/fix_local_cache_middleware.rb:11:in `call'","lib/gitlab/middleware/compressed_json.rb:26:in `call'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'","lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'","lib/gitlab/metrics/requests_rack_middleware.rb:77:in `call'","lib/gitlab/middleware/release_env.rb:13:in `call'"],"user.username":null,"tags.program":"web","tags.locale":"en","tags.feature_category":"continuous_integration","tags.correlation_id":"01G3R50D77FG9TWMYX48AD596G"}
Normally, batch_by_oids
works on changeset hashes, and HGitaly switches to the unfiltered repository to resolve them. Here it is perhaps used for lookup by the prefix hash.