[Reporting] UUID vs PUID (#170177)

## Summary

Closes [169732](https://github.com/elastic/kibana/issues/169732)
This commit is contained in:
Rachel Shen 2023-11-02 11:01:17 -06:00 committed by GitHub
parent 5cfd05a2fa
commit 3e92751b39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { ByteSizeValue } from '@kbn/config-schema';
import type { ElasticsearchClient, Logger } from '@kbn/core/server';
import { defaults, get } from 'lodash';
import Puid from 'puid';
import { v4 as uuidv4 } from 'uuid';
import { Duplex } from 'stream';
import type { ReportingCore } from '..';
import type { ReportSource } from '../../common/types';
@ -74,7 +74,6 @@ export class ContentStream extends Duplex {
private jobSize?: number;
private maxChunkSize?: number;
private parameters: Required<ContentStreamParameters>;
private puid = new Puid();
private primaryTerm?: number;
private seqNo?: number;
@ -233,7 +232,7 @@ export class ContentStream extends Duplex {
private async writeChunk(content: string) {
const { id: parentId, index } = this.document;
const id = this.puid.generate();
const id = uuidv4();
this.logger.debug(`Writing chunk #${this.chunksWritten} (${id}).`);