You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "prashantwason (via GitHub)" <gi...@apache.org> on 2026/08/28 23:04:04 UTC
[PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
prashantwason opened a new pull request, #19790:
URL: https://github.com/apache/hudi/pull/19790
**Describe the issue this Pull Request addresses**
DistributedRegistry is a JVM-wide singleton (cached in Registry.REGISTRY_MAP) and a Spark AccumulatorV2. When executor metrics are enabled (hoodie.metrics.executor.enable=true) and multiple Hudi write clients are created within the same JVM (e.g. batch frameworks processing multiple tables sequentially), the cached DistributedRegistry instance retains metadata set from a prior SparkContext registration.
On a subsequent initRegistry() call:
- AccumulatorV2.isRegistered() returns false — the id is no longer in the current AccumulatorContext
- The guard in DistributedRegistry.register() lets the call through
- AccumulatorV2.register() throws IllegalStateException("Cannot register an Accumulator twice") because metadata is non-null
This crashes the write with HoodieException: Failed to instantiate Metadata table.
**Summary and Changelog**
Fix DistributedRegistry.register() to handle the stale-singleton case where the accumulator was registered to a previous SparkContext that no longer exists.
- DistributedRegistry.register(): on IllegalStateException, create a fresh AccumulatorV2, copy counters from the stale instance, register the fresh instance, and swap it into Registry.REGISTRY_MAP. Changed return type from void to DistributedRegistry so callers receive the potentially-replaced instance.
- SparkHoodieBackedTableMetadataWriter.initRegistry(): use the returned registry from register().
- SparkHoodieBackedTableMetadataWriterTableVersionSix.initRegistry(): same.
- HoodieSparkEngineContext.getMetricRegistry(): same.
- TestDistributedRegistry: added testRegisterIdempotent and testRegisterHandlesStaleAccumulator.
**Impact**
No public API or user-facing feature change. No performance impact — the fix only alters behavior in the error path (stale accumulator from a dead SparkContext). The normal registration path is unchanged.
**Risk Level**
Low. The catch block only fires when AccumulatorV2.register() throws IllegalStateException, which is the exact crash this fixes. The fresh instance is functionally identical to the original, with counters preserved.
**Documentation Update**
None. No new configs or user-facing changes.
**Contributor's checklist**
- [x] Read through contributor's guide
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "prashantwason (via GitHub)" <gi...@apache.org>.
prashantwason commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6028009062
@hudi-bot run azure
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5458820242
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cdc305506f72fb9434bc94c09ef15fa868de0b6a Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5497865830
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cdc305506f72fb9434bc94c09ef15fa868de0b6a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684)
* 2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "rahil-c (via GitHub)" <gi...@apache.org>.
rahil-c commented on code in PR #19790:
URL: https://github.com/apache/hudi/pull/19790#discussion_r3897322125
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/metrics/DistributedRegistry.java:
##########
@@ -45,9 +45,27 @@ public String getName() {
return name;
}
- public void register(JavaSparkContext jsc) {
- if (!isRegistered()) {
+ public DistributedRegistry register(JavaSparkContext jsc) {
+ if (isRegistered()) {
+ return this;
+ }
+ try {
jsc.sc().register(this);
+ return this;
+ } catch (IllegalStateException e) {
+ // Stale singleton: was registered to a previous SparkContext that no longer exists.
+ // AccumulatorV2.metadata is non-null (so register() rejects it) but isRegistered()
+ // returned false (the id is not in the current AccumulatorContext).
+ // Create a fresh accumulator, register it, and swap it into the registry cache.
+ DistributedRegistry fresh = new DistributedRegistry(this.name);
+ fresh.counters.putAll(this.counters);
+ jsc.sc().register(fresh);
+ Registry.REGISTRY_MAP.forEach((key, registry) -> {
Review Comment:
This swap can only reach `Registry.REGISTRY_MAP`, but `HoodieSparkEngineContext` keeps a second cache, `DISTRIBUTED_REGISTRY_MAP`, which is private static and not visible from here. `createWrapperFileSystemRegistries` resolves the HoodieWrapperFileSystem registries through `getMetricRegistry`, so after a swap that path would still hand back the dead accumulator and silently report nothing, even once the metadata table path recovers.
Would it work better to do the detect-and-replace in `getMetricRegistry`, where both caches are in scope? That would also cover the `computeIfAbsent` short circuit Danny raised above, since the two look like the same root cause.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5458786723
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cdc305506f72fb9434bc94c09ef15fa868de0b6a UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #19790:
URL: https://github.com/apache/hudi/pull/19790#discussion_r3891364442
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/common/HoodieSparkEngineContext.java:
##########
@@ -283,8 +283,7 @@ public Registry getMetricRegistry(String tableName, String registryName) {
final String prefixedName = tableName.isEmpty() ? registryName : tableName + "." + registryName;
return DISTRIBUTED_REGISTRY_MAP.computeIfAbsent(prefixedName, key -> {
Registry registry = Registry.getRegistryOfClass(tableName, registryName, DistributedRegistry.class.getName());
- ((DistributedRegistry) registry).register(javaSparkContext);
- return registry;
+ return ((DistributedRegistry) registry).register(javaSparkContext);
Review Comment:
[P1] Recover existing entries in the engine registry cache
`DISTRIBUTED_REGISTRY_MAP` is static and survives SparkContext restarts, so putting the recovery call inside `computeIfAbsent` skips it for registries already cached by the previous context. Under the stale-accumulator condition this PR handles, a subsequent lookup therefore still returns the unregistered instance. I reproduced this with the PR classes on Spark 3.5.5: obtain a registry through the first engine context, restart Spark, remove the old accumulator ID from `AccumulatorContext` to induce the stale state, and look up the same registry through the new engine context. The lookup returns the old instance with `isRegistered() == false`, and `engineContext.map(...)` fails with `Task not serializable`, caused by `Accumulator must be registered before send to executor`. Please scope/reset this cache with the SparkContext or recover its stale entries before reuse; replacing only `Registry.REGISTRY_MAP` does not update the map captured by engine operations.
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/metrics/TestDistributedRegistry.java:
##########
@@ -228,4 +229,74 @@ public void testGetAllCountsWithPrefix() {
Assertions.assertTrue(countsWithoutPrefix.containsKey(METRIC_1));
Assertions.assertTrue(countsWithoutPrefix.containsKey(METRIC_2));
}
+
+ @Test
+ public void testRegisterIdempotent() {
+ // Given: a DistributedRegistry registered to the SparkContext
+ String registryName = REGISTRY_NAME + "_testIdempotent";
+ DistributedRegistry registry = new DistributedRegistry(registryName);
+ registry.add(METRIC_1, 42);
+ DistributedRegistry result = registry.register(jsc);
+
+ // Then: first registration returns the same instance
+ Assertions.assertSame(registry, result);
+ Assertions.assertTrue(registry.isRegistered());
+
+ // When: register() is called again on the same SparkContext
+ DistributedRegistry result2 = registry.register(jsc);
+
+ // Then: it is a no-op, returns same instance
+ Assertions.assertSame(registry, result2);
+ }
+
+ @Test
+ public void testRegisterHandlesStaleAccumulator() {
+ // Simulate the stale-singleton scenario: a DistributedRegistry that was registered
+ // to a previous SparkContext and cannot be re-registered because AccumulatorV2.metadata
+ // is already set (throws IllegalStateException).
+
+ // Given: a registry cached in the global REGISTRY_MAP
+ String registryName = REGISTRY_NAME + "_testStale";
+ DistributedRegistry staleRegistry = new DistributedRegistry(registryName);
+ staleRegistry.add(METRIC_1, 100);
+ staleRegistry.add(METRIC_2, 200);
+ String cacheKey = Registry.makeKey("", registryName);
+ Registry.REGISTRY_MAP.put(cacheKey, staleRegistry);
+
+ // Given: register to SparkContext #1
+ staleRegistry.register(jsc);
+ Assertions.assertTrue(staleRegistry.isRegistered());
+
+ // Simulate SparkContext restart: stop and create a new one
+ jsc.stop();
+ SparkConf conf = HoodieClientTestUtils.getSparkConfForTest(
+ TestDistributedRegistry.class.getSimpleName() + "_stale");
+ JavaSparkContext jsc2 = new JavaSparkContext(conf);
+
+ try {
+ // When: register() is called with the new SparkContext
+ // In local mode, isRegistered() may still return true since AccumulatorContext
+ // persists across stop/start. Force the stale path by calling register on jsc2.
+ // The key invariant: it must not throw IllegalStateException.
+ DistributedRegistry result = staleRegistry.register(jsc2);
Review Comment:
[P2] Force the stale state so this test exercises recovery
Stopping and recreating the SparkContext does not remove this strongly referenced accumulator from the JVM-wide `AccumulatorContext` on Spark 3.5.5. Consequently, this call returns from the `isRegistered()` guard and never exercises the catch block or cache replacement. I ran both added tests successfully, then removed the entire recovery block while retaining the new return type, and both tests still passed. Please explicitly remove `staleRegistry.id()` from `AccumulatorContext` and assert `!staleRegistry.isRegistered()` before calling `register()`. Then assert that the result is a different instance and that `Registry.REGISTRY_MAP.get(cacheKey)` is that result, alongside the counter checks, so removing or breaking the fix actually fails the regression test.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "prashantwason (via GitHub)" <gi...@apache.org>.
prashantwason commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5998287828
Thanks @danny0405, @rahil-c and @voonhous for the reviews and the repro. Addressed in 6d0213c:
- **Engine registry cache** (@danny0405 P1, @rahil-c): `getMetricRegistry` now registers on every lookup via `compute` instead of inside `computeIfAbsent`, so entries cached in `DISTRIBUTED_REGISTRY_MAP` under a previous SparkContext are recovered. Since engine operations serialize the whole `DISTRIBUTED_REGISTRY_MAP` into their tasks, a single stale entry would fail every `map`/`flatMap`/... even if nobody looks it up again, so those operations now also recover stale entries before shipping the map (`getDistributedRegistries()`).
- **Test exercises the stale path** (@danny0405 P2): the tests now remove the accumulator from `AccumulatorContext`, assert `!isRegistered()`, and then assert the result is a different, registered instance that carries the counters and is the cached entry in `REGISTRY_MAP`. Added `testEngineContextRecoversStaleRegistry`, which reproduces your scenario through the engine context, including an `engineContext.map(...)` call. The SparkContext restart is gone.
- **Concurrency**: `register()` is synchronized and a stale instance remembers its registered replacement, so concurrent callers and the other cache resolve to the same accumulator instead of registering a second one.
- **#19063** (@voonhous): the description now says "Part of #19063 (gap 2)" and explains it is the same stale singleton seen from the other side.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5998559001
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748)
* 6d0213c00f90235d50efea4507865305509d16a0 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "prashantwason (via GitHub)" <gi...@apache.org>.
prashantwason commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6009732921
Pushed 2216888 and merged master (1c85053, conflicts with #19575 resolved). Here is how `DistributedRegistry.register(jsc)` now works:
1. **Already registered with the current context** (`isRegistered()`): return `this`.
2. **Never registered** (`registeredAppId == null`): register `this`, stamp `registeredAppId`, return `this`. This is the normal first-time path. I reused the `registeredAppId` field from #19575 as the "was registered before" marker instead of adding a separate flag; it is still only stamped when this call actually registers.
3. **Stale** (registered before, but its id is no longer in the current `AccumulatorContext`, i.e. the previous SparkContext is gone and `AccumulatorV2` refuses a second registration):
- If this instance was already replaced, delegate to the replacement (`replacement = replacement.register(jsc)`). So every cache still holding the original resolves to the same live accumulator, and a replacement that goes stale after *another* restart is replaced in turn and swapped into `REGISTRY_MAP` too (the map holds the replacement by then, not the original).
- Otherwise create a fresh `DistributedRegistry` that **shares** the stale instance's `counters` map (no copy), register it, swap it into `Registry.REGISTRY_MAP`, and remember it as `replacement`.
What changed versus the previous revision:
- **Counters are shared, not copied.** Previously the counters were copied once at swap time, so anything still holding the stale instance (the metadata writer's `registry` field, `HoodieWrapperFileSystem`'s static registries) kept adding to an accumulator nobody reports, and those updates were lost. With a shared map, those updates land in the counters the replacement reports. Executors are unaffected: Spark ships `copy()`, which creates its own map; only driver-side instances share.
- **Staleness is detected explicitly instead of via `catch (IllegalStateException)`.** The broad catch also treated unrelated failures (e.g. a stopped SparkContext) as staleness and then threw uncaught from the second `register`, leaving the caches half-updated. Now any other registration failure just propagates.
- **Tests:** `testRegisterHandlesStaleAccumulator` additionally checks that an update through the stale instance is visible in the replacement, and that after the replacement itself goes stale, a new registered replacement is created, cached, keeps the counters, and is returned to holders of both older instances.
`TestDistributedRegistry`, `TestDistributedRegistryUnderTaskRetry` and `TestRecordIndexLookupMetrics` pass locally on the merged branch.
@danny0405 @rahil-c could you take another look when you get a chance? Thanks!
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "bhasudha (via GitHub)" <gi...@apache.org>.
bhasudha commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5469257324
@danny0405 @rahil-c can you help review this PR ?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6009838902
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
}, {
"hash" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"triggerType" : "PUSH"
}, {
"hash" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6d0213c00f90235d50efea4507865305509d16a0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453)
* 22168881ed5ab9ae443af26cc8b5cd7639da4f82 UNKNOWN
* 1c850539d2b479e68e9f4036aa101fffcf92fef8 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6009952703
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
}, {
"hash" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"triggerType" : "PUSH"
}, {
"hash" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17478",
"triggerID" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6d0213c00f90235d50efea4507865305509d16a0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453)
* 22168881ed5ab9ae443af26cc8b5cd7639da4f82 UNKNOWN
* 1c850539d2b479e68e9f4036aa101fffcf92fef8 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17478)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5459439410
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cdc305506f72fb9434bc94c09ef15fa868de0b6a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6009929675
## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19790?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 77.63%. Comparing base ([`862f4b9`](https://app.codecov.io/gh/apache/hudi/commit/862f4b9a5c92b82047ed40c8880708e4351bc5f2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1c85053`](https://app.codecov.io/gh/apache/hudi/commit/1c850539d2b479e68e9f4036aa101fffcf92fef8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #19790 +/- ##
============================================
- Coverage 77.63% 77.63% -0.01%
+ Complexity 33715 33707 -8
============================================
Files 2552 2552
Lines 143261 143247 -14
Branches 17427 17427
============================================
- Hits 111221 111208 -13
+ Misses 23922 23921 -1
Partials 8118 8118
```
| [Components](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hudi-common](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `82.43% <ø> (ø)` | |
| [hudi-client](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `79.04% <ø> (-0.01%)` | :arrow_down: |
| [hudi-flink](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.34% <ø> (ø)` | |
| [hudi-spark-datasource](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.09% <ø> (ø)` | |
| [hudi-utilities](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.18% <ø> (ø)` | |
| [hudi-cli](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.78% <ø> (ø)` | |
| [hudi-hadoop](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.33% <ø> (ø)` | |
| [hudi-sync](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.25% <ø> (ø)` | |
| [hudi-io](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.38% <ø> (ø)` | |
| [hudi-timeline-service](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.17% <ø> (ø)` | |
| [hudi-cloud](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | |
| [hudi-kafka-connect](https://app.codecov.io/gh/apache/hudi/pull/19790/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.20% <ø> (ø)` | |
| [Flag](https://app.codecov.io/gh/apache/hudi/pull/19790/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.98% <ø> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19790?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...e/hudi/client/common/HoodieSparkEngineContext.java](https://app.codecov.io/gh/apache/hudi/pull/19790?src=pr&el=tree&filepath=hudi-client%2Fhudi-spark-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Fclient%2Fcommon%2FHoodieSparkEngineContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1zcGFyay1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvY2xpZW50L2NvbW1vbi9Ib29kaWVTcGFya0VuZ2luZUNvbnRleHQuamF2YQ==) | `74.80% <ø> (-0.94%)` | :arrow_down: |
| [...metadata/SparkHoodieBackedTableMetadataWriter.java](https://app.codecov.io/gh/apache/hudi/pull/19790?src=pr&el=tree&filepath=hudi-client%2Fhudi-spark-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Fmetadata%2FSparkHoodieBackedTableMetadataWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1zcGFyay1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvbWV0YWRhdGEvU3BhcmtIb29kaWVCYWNrZWRUYWJsZU1ldGFkYXRhV3JpdGVyLmphdmE=) | `80.35% <ø> (-0.68%)` | :arrow_down: |
| [...oodieBackedTableMetadataWriterTableVersionSix.java](https://app.codecov.io/gh/apache/hudi/pull/19790?src=pr&el=tree&filepath=hudi-client%2Fhudi-spark-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Fmetadata%2FSparkHoodieBackedTableMetadataWriterTableVersionSix.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1zcGFyay1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvbWV0YWRhdGEvU3BhcmtIb29kaWVCYWNrZWRUYWJsZU1ldGFkYXRhV3JpdGVyVGFibGVWZXJzaW9uU2l4LmphdmE=) | `91.30% <ø> (-0.37%)` | :arrow_down: |
| [...a/org/apache/hudi/metrics/DistributedRegistry.java](https://app.codecov.io/gh/apache/hudi/pull/19790?src=pr&el=tree&filepath=hudi-client%2Fhudi-spark-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Fmetrics%2FDistributedRegistry.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1jbGllbnQvaHVkaS1zcGFyay1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvbWV0cmljcy9EaXN0cmlidXRlZFJlZ2lzdHJ5LmphdmE=) | `93.33% <ø> (-0.15%)` | :arrow_down: |
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-agent (via GitHub)" <gi...@apache.org>.
hudi-agent commented on code in PR #19790:
URL: https://github.com/apache/hudi/pull/19790#discussion_r3900942015
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/metrics/TestDistributedRegistry.java:
##########
@@ -228,4 +229,74 @@ public void testGetAllCountsWithPrefix() {
Assertions.assertTrue(countsWithoutPrefix.containsKey(METRIC_1));
Assertions.assertTrue(countsWithoutPrefix.containsKey(METRIC_2));
}
+
+ @Test
+ public void testRegisterIdempotent() {
+ // Given: a DistributedRegistry registered to the SparkContext
+ String registryName = REGISTRY_NAME + "_testIdempotent";
+ DistributedRegistry registry = new DistributedRegistry(registryName);
+ registry.add(METRIC_1, 42);
+ DistributedRegistry result = registry.register(jsc);
+
+ // Then: first registration returns the same instance
+ Assertions.assertSame(registry, result);
+ Assertions.assertTrue(registry.isRegistered());
+
+ // When: register() is called again on the same SparkContext
+ DistributedRegistry result2 = registry.register(jsc);
+
+ // Then: it is a no-op, returns same instance
+ Assertions.assertSame(registry, result2);
+ }
+
+ @Test
+ public void testRegisterHandlesStaleAccumulator() {
+ // Simulate the stale-singleton scenario: a DistributedRegistry that was registered
+ // to a previous SparkContext and cannot be re-registered because AccumulatorV2.metadata
+ // is already set (throws IllegalStateException).
+
+ // Given: a registry cached in the global REGISTRY_MAP
+ String registryName = REGISTRY_NAME + "_testStale";
+ DistributedRegistry staleRegistry = new DistributedRegistry(registryName);
+ staleRegistry.add(METRIC_1, 100);
+ staleRegistry.add(METRIC_2, 200);
+ String cacheKey = Registry.makeKey("", registryName);
+ Registry.REGISTRY_MAP.put(cacheKey, staleRegistry);
+
+ // Given: register to SparkContext #1
+ staleRegistry.register(jsc);
+ Assertions.assertTrue(staleRegistry.isRegistered());
+
+ // Simulate SparkContext restart: stop and create a new one
+ jsc.stop();
+ SparkConf conf = HoodieClientTestUtils.getSparkConfForTest(
+ TestDistributedRegistry.class.getSimpleName() + "_stale");
+ JavaSparkContext jsc2 = new JavaSparkContext(conf);
Review Comment:
🤖 nit: the comment here admits the catch path may never be hit in local mode, which undercuts what the test name promises — could you either rename it to something like `testRegisterWithNewSparkContext` that reflects what it actually exercises, or add a note explaining how the stale-singleton catch branch is separately validated?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub>
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/metrics/DistributedRegistry.java:
##########
@@ -45,9 +45,27 @@ public String getName() {
return name;
}
- public void register(JavaSparkContext jsc) {
- if (!isRegistered()) {
+ public DistributedRegistry register(JavaSparkContext jsc) {
Review Comment:
🤖 Since the whole point here is a JVM-wide singleton shared across multiple write clients, could two threads race in this method? The `isRegistered()` check and the catch/swap are unsynchronized, so two concurrent callers on the same stale instance could each build a `fresh`, both call `jsc.sc().register(fresh)` (registering two accumulators), and then race on the `REGISTRY_MAP` swap — leaving one registered accumulator orphaned and callers holding different instances. If concurrent write-client init is possible, would it be worth synchronizing register() (or guarding the swap)? @nsivabalan
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub>
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/metrics/DistributedRegistry.java:
##########
@@ -45,9 +45,27 @@ public String getName() {
return name;
}
- public void register(JavaSparkContext jsc) {
- if (!isRegistered()) {
+ public DistributedRegistry register(JavaSparkContext jsc) {
+ if (isRegistered()) {
+ return this;
+ }
+ try {
jsc.sc().register(this);
+ return this;
+ } catch (IllegalStateException e) {
+ // Stale singleton: was registered to a previous SparkContext that no longer exists.
+ // AccumulatorV2.metadata is non-null (so register() rejects it) but isRegistered()
+ // returned false (the id is not in the current AccumulatorContext).
+ // Create a fresh accumulator, register it, and swap it into the registry cache.
+ DistributedRegistry fresh = new DistributedRegistry(this.name);
+ fresh.counters.putAll(this.counters);
+ jsc.sc().register(fresh);
+ Registry.REGISTRY_MAP.forEach((key, registry) -> {
Review Comment:
🤖 Agreed that `getMetricRegistry` is the natural spot — it's the only place both caches are visible (`DISTRIBUTED_REGISTRY_MAP` directly, and `Registry.REGISTRY_MAP` via `getRegistryOfClass`), and `createWrapperFileSystemRegistries` funnels through it too, so a swap confined to `DistributedRegistry.register()` can't reach `DISTRIBUTED_REGISTRY_MAP`. One thing to watch though: the detect-and-replace has to run on the value returned by `computeIfAbsent`, not inside the lambda — otherwise the short-circuit Danny flagged means an already-cached stale entry is never re-evaluated. A staleness check plus an explicit `put`/`compute` on the returned registry would cover both caches and that computeIfAbsent path.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5497943038
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cdc305506f72fb9434bc94c09ef15fa868de0b6a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684)
* 2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6011130932
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
}, {
"hash" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"triggerType" : "PUSH"
}, {
"hash" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17478",
"triggerID" : "1c850539d2b479e68e9f4036aa101fffcf92fef8",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 22168881ed5ab9ae443af26cc8b5cd7639da4f82 UNKNOWN
* 1c850539d2b479e68e9f4036aa101fffcf92fef8 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17478)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5998440144
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748)
* 6d0213c00f90235d50efea4507865305509d16a0 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6000230567
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6d0213c00f90235d50efea4507865305509d16a0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5461432909
Could the description reference #19063? This is gap 2 there.
Worth a line saying it is the same stale singleton seen from the other side: gap 2's text describes `register()` silently no-opping when the id is still in `AccumulatorContext`, this PR fixes the throw when it is not. Without that, the two read as different bugs and gap 2 never gets ticked.
`Part of #19063` rather than a closing keyword, since the umbrella's other gaps are still open.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-5499124994
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6009758293
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16684",
"triggerID" : "cdc305506f72fb9434bc94c09ef15fa868de0b6a",
"triggerType" : "PUSH"
}, {
"hash" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16748",
"triggerID" : "2b550b6b223be36a96d055ac5f1d5b2f8df9c6cd",
"triggerType" : "PUSH"
}, {
"hash" : "6d0213c00f90235d50efea4507865305509d16a0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453",
"triggerID" : "6d0213c00f90235d50efea4507865305509d16a0",
"triggerType" : "PUSH"
}, {
"hash" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "22168881ed5ab9ae443af26cc8b5cd7639da4f82",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 6d0213c00f90235d50efea4507865305509d16a0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=17453)
* 22168881ed5ab9ae443af26cc8b5cd7639da4f82 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #19790:
URL: https://github.com/apache/hudi/pull/19790
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(metrics): handle stale DistributedRegistry across SparkContext restarts. [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #19790:
URL: https://github.com/apache/hudi/pull/19790#issuecomment-6007618213
Hi, @prashantwason there are some conflicts, can you try to resolve it.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org