Skip to content

Conversation

@ehigham
Copy link
Member

@ehigham ehigham commented Sep 19, 2025

Changes the HailContext and Backend relationship by:

  1. Removing the direct dependency of HailContext on Backend by:

    • Removing the backend parameter from HailContext constructor
    • Introducing a static Backend.get/set mechanism to access the current backend
  2. Ensures proper backend lifecycle management:

    • Moves backend.close() calls to appropriate locations
    • Sets up Backend.set(null) after operations to prevent leaks

This change cannot impact the Hail Batch instance as deployed by Broad Institute in GCP

@ehigham ehigham marked this pull request as ready for review September 19, 2025 20:35
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from bffda9c to 4763fac Compare September 23, 2025 19:37
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from a97c244 to 0e44399 Compare September 23, 2025 19:37
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from 0e44399 to d7f2ad5 Compare September 25, 2025 01:53
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from 4763fac to 881f910 Compare September 25, 2025 01:53
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from d7f2ad5 to 4a64e37 Compare September 25, 2025 13:49
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch 2 times, most recently from 39ddc1e to cc76fed Compare September 25, 2025 16:30
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from 4a64e37 to 9e8b336 Compare September 25, 2025 16:30
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from cc76fed to 7b9b10e Compare September 25, 2025 16:47
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from 9e8b336 to 56259f0 Compare September 25, 2025 16:47
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from 7b9b10e to 0a1f47e Compare September 25, 2025 17:08
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch 2 times, most recently from 107d616 to c11b3e0 Compare September 25, 2025 17:09
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from 0a1f47e to 046213b Compare September 25, 2025 17:09
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from c11b3e0 to df823b1 Compare September 25, 2025 18:37
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from 046213b to 6924e88 Compare September 25, 2025 18:37
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from 6924e88 to fb861eb Compare September 26, 2025 01:06
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch 2 times, most recently from bb05f1b to ceb567d Compare September 26, 2025 02:21
@ehigham ehigham force-pushed the ehigham/move-configure-logging-out-of-hail-context branch from fb861eb to 5eb5b64 Compare September 26, 2025 02:21
Base automatically changed from ehigham/move-configure-logging-out-of-hail-context to main September 26, 2025 17:38
@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch 2 times, most recently from 510c839 to fa1b8dc Compare September 29, 2025 14:45
Copy link
Collaborator

@chrisvittal chrisvittal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The end is in sight! Thanks for pushing on this.

@ehigham ehigham force-pushed the ehigham/move-backend-out-of-hail-context branch from fa1b8dc to 5fa1fbc Compare September 29, 2025 16:16
Comment on lines +47 to +57
// Currently required by `BackendUtils.collectDArray`
private[this] var instance: Backend = _

def set(b: Backend): Unit =
synchronized { instance = b }

def get: Backend =
synchronized {
assert(instance != null)
instance
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary before this is removed in #15107

Copy link
Member

@patrick-schultz patrick-schultz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So close!

@hail-ci-robot hail-ci-robot merged commit 5d6a5df into main Sep 30, 2025
3 checks passed
@hail-ci-robot hail-ci-robot deleted the ehigham/move-backend-out-of-hail-context branch September 30, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants