refactor: make raw archive store optional
This commit is contained in:
@@ -90,3 +90,12 @@
|
||||
2. vehicle-state-service 仅保留在 `optional-latest-state` profile,需要 Redis 最新状态查询能力时显式构建。
|
||||
3. 默认优化和验证优先覆盖活跃接入、TDengine 历史和 MySQL 指标链路。
|
||||
- **Consequences**: 默认构建和部署边界继续收窄;最新状态能力保持源码可用,但其测试需要通过 `-Poptional-latest-state` 显式运行。
|
||||
|
||||
## ADR-014 raw-archive-store 原型实现:Optional only
|
||||
- **Status**: Accepted
|
||||
- **Context**: 默认生产 raw bytes 写入由 `sink-archive` 负责,历史查询通过 TDengine `raw_frames` 和 `archive://...` 引用追溯;`raw-archive-store` 当前只是独立读写接口和本地实现原型,没有默认 app 或 service 依赖。
|
||||
- **Decision**:
|
||||
1. `raw-archive-store` 不进入默认 Maven reactor。
|
||||
2. raw-archive-store 仅保留在 `optional-raw-archive-store` profile,需要验证本地读写原型时显式构建。
|
||||
3. 默认生产链路继续以 `sink-archive`、Kafka raw topic、TDengine raw_frames 为准。
|
||||
- **Consequences**: 默认构建少一个未部署模块;本地 raw archive 原型仍可通过 `-Poptional-raw-archive-store` 保留和验证。
|
||||
|
||||
@@ -188,6 +188,8 @@ flowchart LR
|
||||
`optional-attachments`.
|
||||
- vehicle-state-service is absent from the default Maven reactor and available
|
||||
through `optional-latest-state`.
|
||||
- raw-archive-store is absent from the default Maven reactor and available
|
||||
through `optional-raw-archive-store`.
|
||||
- History APIs read from TDengine by default; Parquet/DuckDB is optional
|
||||
compatibility only.
|
||||
- Raw frame queries can return complete parsed JSON through `payloadJson.parsed`.
|
||||
|
||||
@@ -52,6 +52,17 @@ class MavenModuleProfileTest {
|
||||
.containsExactly("modules/services/vehicle-state-service");
|
||||
}
|
||||
|
||||
@Test
|
||||
void rawArchiveStorePrototypeIsOptionalAndOutsideDefaultProductionReactor() throws Exception {
|
||||
Document pom = rootPom();
|
||||
|
||||
assertThat(defaultModules(pom))
|
||||
.doesNotContain("modules/sinks/raw-archive-store");
|
||||
|
||||
assertThat(profileModules(pom, "optional-raw-archive-store"))
|
||||
.containsExactly("modules/sinks/raw-archive-store");
|
||||
}
|
||||
|
||||
@Test
|
||||
void xindaIsLegacyOnlyAndOutsideDefaultProductionReactor() throws Exception {
|
||||
Document pom = rootPom();
|
||||
@@ -121,6 +132,7 @@ class MavenModuleProfileTest {
|
||||
.contains("Xinda Push 仅保留在 `legacy-xinda` profile")
|
||||
.contains("JSATL12 仅保留在 `optional-attachments` profile")
|
||||
.contains("vehicle-state-service 仅保留在 `optional-latest-state` profile")
|
||||
.contains("raw-archive-store 仅保留在 `optional-raw-archive-store` profile")
|
||||
.doesNotContain("## ADR-004 信达 Push:保留模块但彻底重写\n- **Status**: Accepted")
|
||||
.doesNotContain("Spring Boot 3.4.x");
|
||||
}
|
||||
|
||||
7
pom.xml
7
pom.xml
@@ -26,7 +26,6 @@
|
||||
<module>modules/core/observability</module>
|
||||
<module>modules/sinks/sink-mq</module>
|
||||
<module>modules/sinks/sink-archive</module>
|
||||
<module>modules/sinks/raw-archive-store</module>
|
||||
<module>modules/sinks/event-file-store</module>
|
||||
<module>modules/sinks/tdengine-history-store</module>
|
||||
<module>modules/services/event-history-service</module>
|
||||
@@ -61,6 +60,12 @@
|
||||
<module>modules/services/vehicle-state-service</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>optional-raw-archive-store</id>
|
||||
<modules>
|
||||
<module>modules/sinks/raw-archive-store</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>legacy-xinda</id>
|
||||
<modules>
|
||||
|
||||
Reference in New Issue
Block a user