feat(server): add perf metrics for apply update (#14736)

#### PR Dependency Tree


* **PR #14736** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced Kubernetes deployment health check configurations with
explicit timeout, period, failure threshold, and success threshold
settings for improved reliability.
* Improved document synchronization infrastructure with enhanced codec
comparison and merge update capabilities for better data consistency
handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-03-27 19:50:53 +08:00
committed by GitHub
parent 9cf98d9345
commit 64f385817d
10 changed files with 1061 additions and 70 deletions

View File

@@ -32,7 +32,6 @@ import {
SpaceAccessDenied,
} from '../../base';
import { Models } from '../../models';
import { mergeUpdatesInApplyWay } from '../../native';
import { CurrentUser } from '../auth';
import {
DocReader,
@@ -40,6 +39,7 @@ import {
PgUserspaceDocStorageAdapter,
PgWorkspaceDocStorageAdapter,
} from '../doc';
import { applyUpdatesWithNative } from '../doc/merge-updates';
import { AccessController, WorkspaceAction } from '../permission';
import { DocID } from '../utils/doc';
@@ -268,8 +268,10 @@ export class SpaceSyncGateway
}
try {
const merged = mergeUpdatesInApplyWay(
updates.map(update => Buffer.from(update))
const merged = applyUpdatesWithNative(
updates,
'socketio.broadcast',
this.logger
);
metrics.socketio.counter('doc_updates_compressed').add(1);
return {