diff --git a/components/gitpod-db/src/typeorm/code-sync-resource-db.ts b/components/gitpod-db/src/typeorm/code-sync-resource-db.ts index 1d24aeea07e5ce..24c83ed67db948 100644 --- a/components/gitpod-db/src/typeorm/code-sync-resource-db.ts +++ b/components/gitpod-db/src/typeorm/code-sync-resource-db.ts @@ -96,6 +96,7 @@ export class CodeSyncResourceDB { } else { latest = await this.doGetResource(manager, userId, kind, 'latest'); } + // TODO(hw): why we use `latest?.rev !== params.latestRev` ? what's latestRev? if (params?.latestRev && latest?.rev !== params.latestRev) { return undefined; } diff --git a/components/server/src/code-sync/code-sync-service.ts b/components/server/src/code-sync/code-sync-service.ts index 8dfd02f3da84e6..405ae2f67f7953 100644 --- a/components/server/src/code-sync/code-sync-service.ts +++ b/components/server/src/code-sync/code-sync-service.ts @@ -24,7 +24,7 @@ import { Config } from '../config'; import { CachingBlobServiceClientProvider } from '@gitpod/content-service/lib/sugar'; // By default: 5 kind of resources * 20 revs * 1Mb = 100Mb max in the content service for user data. -const defaultRevLimit = 20; +const defaultRevLimit = 2; // It should keep it aligned with client_max_body_size for /code-sync location. const defaultContentLimit = '1Mb'; export type CodeSyncConfig = Partial<{