@@ -185,7 +185,6 @@ export class WriteAheadLogFile<T> implements AppendableSink<T> {
185185 * Repack the WAL by recovering all valid records and rewriting cleanly.
186186 * Removes corrupted entries and ensures clean formatting.
187187 * @param out - Output path (defaults to current file)
188- * @throws Error if recovery encounters decode errors
189188 */
190189 repack ( out = this . #file) {
191190 this . close ( ) ;
@@ -311,7 +310,7 @@ let shardCount = 0;
311310 */
312311export function getShardId ( ) : string {
313312 const timestamp = Math . round ( performance . timeOrigin + performance . now ( ) ) ;
314- const readableTimestamp = soratebleReadableDateString ( `${ timestamp } ` ) ;
313+ const readableTimestamp = sortableReadableDateString ( `${ timestamp } ` ) ;
315314 return `${ readableTimestamp } .${ process . pid } .${ threadId } .${ ++ shardCount } ` ;
316315}
317316
@@ -323,7 +322,7 @@ export function getShardId(): string {
323322 * Example: "20240101-120000-000"
324323 */
325324export function getShardedGroupId ( ) : string {
326- return soratebleReadableDateString (
325+ return sortableReadableDateString (
327326 `${ Math . round ( performance . timeOrigin + performance . now ( ) ) } ` ,
328327 ) ;
329328}
@@ -340,7 +339,7 @@ export const WAL_ID_PATTERNS = {
340339 SHARD_ID : / ^ \d { 8 } - \d { 6 } - \d { 3 } (?: \. \d + ) { 3 } $ / ,
341340} as const ;
342341
343- export function soratebleReadableDateString ( timestampMs : string ) : string {
342+ export function sortableReadableDateString ( timestampMs : string ) : string {
344343 const timestamp = Number . parseInt ( timestampMs , 10 ) ;
345344 const date = new Date ( timestamp ) ;
346345 const MILLISECONDS_PER_SECOND = 1000 ;
0 commit comments