Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adding purging
  • Loading branch information
ericm-db committed Jun 13, 2024
commit f4002029c2df113bf5a5a66da0434a2f237b0e1f
Original file line number Diff line number Diff line change
Expand Up @@ -909,10 +909,10 @@ class MicroBatchExecution(
if (shouldWriteMetadatas) {
execCtx.executionPlan.executedPlan.collect {
case tws: TransformWithStateExec =>
val schema = tws.getColumnFamilyJValue()
val metadata = tws.operatorStateMetadata()
val id = metadata.operatorInfo.operatorId
val schemaFile = stateSchemaLogs(id)
val schema = tws.getColumnFamilyJValue()
if (!schemaFile.add(execCtx.batchId, schema)) {
throw QueryExecutionErrors.concurrentStreamLogUpdate(execCtx.batchId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@ abstract class StreamExecution(
protected def purgeOldest(): Unit = {
operatorStateMetadataLogs.foreach(
_._2.purgeOldest(minLogEntriesToMaintain))
stateSchemaLogs.foreach(
_._2.purgeOldest(minLogEntriesToMaintain))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ class TransformWithStateSuite extends StateStoreMetricsTest
StopStream
)

logError(s"### Restarting stream")
val result2 = inputData.toDS()
.groupByKey(x => x)
.transformWithState(
Expand Down