Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logger): fix logger storage issue for key already exists #10

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

unadlib
Copy link
Collaborator

@unadlib unadlib commented Jul 10, 2024

No description provided.

this._savingLogs.add(data);
data.time = await this._checkTimeKey(data.time);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so from now every time will reget value from DB storage

what is the time be use?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個time的用途是什麼?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "time" refers to the initialization time of each log entry. It means that every time a write is made to the DB, this "time" will be set in memory as the value for a new log entry using the current time.

It's different from a session, which is a value for a single runtime.

The "time" field here is used for index querying.

@unadlib unadlib merged commit 0810574 into main Jul 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants