Skip to content

Commit

Permalink
UBER-1178: remove total for indexer, formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
  • Loading branch information
ThetaDR committed Dec 25, 2023
1 parent 6d7632d commit 22ec0d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function docUpdKey (name: string, opt?: IndexKeyOptions): string {
*/
export function docKey (name: string, opt?: IndexKeyOptions): string {
const extra = opt?.extra !== undefined && opt?.extra?.length > 0 ? `#${opt.extra?.join('#') ?? ''}` : ''
return (opt?._class === undefined ? name : `${opt?._class}%${name}${extra}`)
return opt?._class === undefined ? name : `${opt?._class}%${name}${extra}`
}

/**
Expand Down
9 changes: 4 additions & 5 deletions server/core/src/indexer/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ export class FullTextIndexPipeline implements FullTextPipeline {
limit: globalIndexer.processingSize,
sort: {
_id: 1
},
total: true
}
}
)
)
Expand Down Expand Up @@ -439,8 +438,7 @@ export class FullTextIndexPipeline implements FullTextPipeline {
`Full text: Indexing ${this.indexId} ${st.stageId}`,
Object.entries(this.currentStages)
.map((it) => `${it[0]}:${it[1]}`)
.join(' '),
result.total
.join(' ')
)
} else {
// Nothing to index, check on next cycle.
Expand Down Expand Up @@ -569,7 +567,8 @@ export class FullTextIndexPipeline implements FullTextPipeline {
}
return toIndex
}
// TODO: Move to migration

// TODO: Move to migration
async checkIndexConsistency (dbStorage: ServerStorage): Promise<void> {
await rateLimitter.exec(async () => {
if (process.env.MODEL_VERSION !== undefined) {
Expand Down

0 comments on commit 22ec0d8

Please sign in to comment.