The GitHub Actions job "Coverage" on 
grails-core.git/feature/mongodb-skip-index-build-8.0.x has failed.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
848282548a9abe36845bd79f9574f0da7157dbb2 / Scott Murphy Heiberg 
<[email protected]>
Report, interrupt and resume the index build through its whole lifecycle

Addresses the index-build findings from review, all in the same build loop:

- A build that stops partway - a lost connection or a timeout thrown past the
  MongoCommandException handling - now still logs its summary, as "did not
  finish ... at N of M domain class(es)", at WARN, or at DEBUG when it was
  abandoned for shutdown. A build on the calling thread still propagates the
  exception, after the summary.

- stop() interrupts a background build before it closes the client, instead of
  leaving it to fail against the closed client and be logged as a failure, and
  records that it was cut short. start() builds a fresh executor, since a shut
  down one is terminal, and runs the build again.

- buildIndex() after close() logs a warning instead of throwing
  RejectedExecutionException; while stopped it defers the build to start().

- A conflict re-lists the collection's indexes instead of reconciling against 
the
  listing taken before the build started, so an index created since - by another
  instance, or another connection building concurrently - is found and
  reconciled rather than reported as a failure.

- An index recreateOnConflict dropped and built again is counted as recreated. 
It
  was counted as already present, which is what a restart that changed nothing
  reports, for what may have been a full rebuild. contains() keeps matching any
  text index: MongoDB reports an existing text index under a synthetic key, so a
  strict comparison would report every unchanged text index as created.

- The listIndexes that separates created from already-present indexes is only
  issued when the summary will be logged, so an application with the logger
  above INFO does not pay a round trip per indexed collection for a line it
  never sees.

- initializeIndices(PersistentEntity) documents that an asynchronous build can
  call it before a subclass constructor has finished. Moving the build out of
  the constructor would break standalone use, where nothing calls a lifecycle
  callback.

- The worker comes from Spring's CustomizableThreadFactory rather than a class 
of
  its own, and is named gorm-mongo-index-build-<connection>-<n>.

FailingMongoClient now hands its interceptor a closure that makes the real call,
so a test can let some calls through and fail or alter others.

Report URL: https://github.com/apache/grails-core/actions/runs/35634064994

With regards,
GitHub Actions via GitBox

Reply via email to