Repository navigation
[Operator Caching Step 3] add operator cache backend new files and config changes - #1328
Merged
Merged
Conversation
zuozhiw
force-pushed
the
zuozhi-jiashu-cache-pr-3
branch
from
September 3, 2021 07:34
60e256b to
062fd95
Compare
jiashu-z
reviewed
Sep 3, 2021
jiashu-z
left a comment
Contributor
There was a problem hiding this comment.
I'll add more testcases for WorkflowRewriter today.
Yicong-Huang
requested changes
Sep 3, 2021
Yicong-Huang
left a comment
Contributor
There was a problem hiding this comment.
I think this PR needs some changes if time allows.
1. Add try catch for operations with lock in JCS and MongoDB. 2. Replace mutable.HashMap with ConcurrentHashMap in Memory. 3. Modify log.
jiashu-z
reviewed
Sep 4, 2021
jiashu-z
reviewed
Sep 4, 2021
jiashu-z
left a comment
Contributor
There was a problem hiding this comment.
@zuozhiw @Yicong-Huang I modified some implementation as requested. Please check the latest version.
jiashu-z
self-requested a review
September 4, 2021 14:50
jiashu-z
approved these changes
Sep 4, 2021
jiashu-z
self-requested a review
September 4, 2021 15:50
jiashu-z
approved these changes
Sep 4, 2021
Yicong-Huang
approved these changes
Sep 8, 2021
jiashu-z
self-requested a review
September 8, 2021 06:57
jiashu-z
approved these changes
Sep 8, 2021
5 of 7 tasks
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…nfig changes (apache#1328) This is the third PR for implementing operator cache. In this PR, only new files and necessary config changes are included. Files including: - config changes in `built.sbt`, `application.conf`, `Constants.scala` - new cache-related websocket Requests/Responses for frontend - a new `OpResultStorage` interface for caching, and 3 implementations: `Mongo`, `ApacheJCS`, and `In-Memory` - a new pair `CacheSourceOp` and `CacheSinkOp` - a new `WorkflowRewriter` that does cache invalidation and rewriting logic Co-authored-by: jiashu zhang <[email protected]> Co-authored-by: Yicong Huang <[email protected]>
This was referenced Sep 4, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Sep 17, 2026
…#8395) ### What changes were proposed in this PR? Deletes `TupleUtils.json2tuple`, which has no production caller. Pure deletion, no behaviour change: **−114 lines**. Its sibling `tuple2json` is live — `ExecutionResultService` uses it — and stays, as does the object. ### History | | | | --- | --- | | **Introduced by** | apache#1328 (2021-09-08) — "[Operator Caching Step 3] add operator cache backend new files and config changes"; the cache read path called `val newTuple = json2tuple(line)` when rehydrating cached tuples | | **Usage removed by** | apache#3111 (2024-11-26) — "Update amber to depend on sub projects" deleted that call site while splitting amber into sub-projects | Dead for about two years. > Reviewer note: removing it frees three imports that only it used — `AttributeTypeUtils.{inferSchemaFromRows, parseField}`, `JSONUtils.{JSONToMap, objectMapper}` and `ArrayBuffer`. `TupleSpec`'s "produce identical strings" test was a `tuple2json → json2tuple` round-trip, so it cannot survive the removal and goes with it; that also orphans its `tuple2json` import, which `scalafix` flagged. ### Any related issues, documentation, discussions? Closes apache#8392 ### How was this PR tested? Existing tests only — this PR adds none, since it removes a method and the tests that covered it. Locally, from the repo root with Java 17: - `sbt "WorkflowExecutionService/Test/compile"` — success. - `sbt "WorkflowCore/testOnly *TupleSpec *TupleUtilsSpec"` — 32 tests, all pass. - `sbt scalafmtCheckAll "scalafixAll --check"` — clean. Verification, re-runnable by a reviewer: ``` git grep -n json2tuple # only the deleted method and its tests git grep -n tuple2json # the live sibling, untouched ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5)
This was referenced Sep 26, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Sep 26, 2026
…Event (apache#8690) ### What changes were proposed in this PR? Deletes `CacheStatusUpdateEvent`. It is a websocket event the backend has not sent since the websocket cache check was removed, while the frontend kept a subscription to it. There is no behaviour change: **+3/−87 lines**. Backend: the case class, its `@JsonSubTypes` registration, and its entries in `TexeraWebSocketEventSpec`. Frontend: the interface and `TexeraWebsocketEventTypeMap` entry, and the `subscribeToEvent("CacheStatusUpdateEvent")` handler in `OperatorReuseCacheStatusService` with its two tests. The service's `WorkflowWebsocketService` dependency is removed too, because that handler was its only use. ### History | | | | --- | --- | | **Introduced by** | apache#1328 (2021-09-08), "[Operator Caching Step 3] add operator cache backend new files and config changes". The frontend handler came in apache#1327 the day before | | **Usage removed by** | apache#3111 (2024-11-26), "Update amber to depend on sub projects". It deleted the `EditingTimeCompilationRequest` branch of `WorkflowWebsocketResource`, the only place that called `sessionState.send(CacheStatusUpdateEvent(...))` | It has been dead for nearly two years. The frontend handler has been subscribed to an event that never arrives. > Reviewer note: the reuse-cache marker is unaffected. `OperatorReuseCacheStatusService` still repaints it through its other, live subscription (`getReuseCacheOperatorsChangedStream`). `OperatorResultCacheStatus` and `JointUIService.changeOperatorReuseCacheStatus` stay because that path and the editor still use them. ### Any related issues, documentation, discussions? Closes apache#8689 ### How was this PR tested? No new tests. The protocol spec now covers only the types that remain registered, and the service spec drops the two cases for the removed handler. Locally, from the repo root with Java 17: - `sbt "WorkflowExecutionService/Test/compile"`: success. - `sbt "WorkflowExecutionService/testOnly *TexeraWebSocketEventSpec"`: 10 tests, all pass. - `sbt "WorkflowExecutionService/scalafmtCheckAll" "WorkflowExecutionService/scalafixAll --check"`: clean. From `frontend/`: - `npx ng test --watch=false --include='**/operator-reuse-cache-status.service.spec.ts' --include='**/workflow-websocket.service.spec.ts'`: 18 tests, all pass. - `yarn format:ci`: clean. - `npx ng build`: success. To re-check: ``` git grep -n CacheStatusUpdateEvent # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Oct 2, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Oct 2, 2026
### What changes were proposed in this PR? Deletes `amber/src/main/resources/cache.ccf`, an Apache Commons JCS cache configuration that nothing loads. **−29 lines.** There is no behaviour change. The `commons-jcs3-core` dependency stays, because `ComputingUnitMaster` / `ComputingUnitWorker` still import its `InvalidArgumentException`. JCS never names this file in code: it loads `/cache.ccf` from the classpath implicitly, when the cache manager creates its first region. So the check for this PR is whether anything can create a JCS cache, not whether the file name appears anywhere. Nothing can: - **Source:** the only JCS class referenced in any module is `InvalidArgumentException`. Nothing calls `JCS.getInstance`, `CacheAccess`, `CompositeCacheManager` or `JCSWorker`. - **Bytecode:** after compiling amber and the common modules, the compiled classes reference the same single exception class and no other JCS class. - **Dependencies:** no other jar on amber's runtime or test classpath references JCS. `InvalidArgumentException` is a plain `RuntimeException` subclass with no static initializer, so throwing it never reaches the cache manager. ### History | | | | --- | --- | | **Introduced by** | apache#1328 (2021-09-08), "[Operator Caching Step 3] add operator cache backend new files and config changes", for `JCSOpResultStorage`'s `JCS.getInstance("texera")` | | **Usage removed by** | apache#1363 (2022-01-25), "Sink operator result storage abstraction and refactoring". It deleted `JCSOpResultStorage`, the only code that ever created a JCS cache | It has been dead for over four and a half years. ### Any related issues, documentation, discussions? Closes apache#8814 ### How was this PR tested? No new tests; this deletes a resource file that nothing loads. Locally, from the repo root with Java 17: - `sbt "WorkflowExecutionService/Test/compile"`: success. To re-check: ``` git grep -n -i "cache\.ccf\|JCS\.getInstance\|CompositeCacheManager" # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the third PR for implementing operator cache. In this PR, only new files and necessary config changes are included.
Files including:
built.sbt,application.conf,Constants.scalaOpResultStorageinterface for caching, and 3 implementations:Mongo,ApacheJCS, andIn-MemoryCacheSourceOpandCacheSinkOpWorkflowRewriterthat does cache invalidation and rewriting logic