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

Bug: Error running node agent tick #3952

Open
admtech opened this issue Apr 26, 2024 · 6 comments
Open

Bug: Error running node agent tick #3952

admtech opened this issue Apr 26, 2024 · 6 comments
Assignees
Labels
bug Something isn't working topic:changefeeds This is related to changefeeds topic:live This is related to live queries and push notifications topic:performance Improvements to database performance

Comments

@admtech
Copy link

admtech commented Apr 26, 2024

We started SurrealDB with:

surreal start --log info --bind 0.0.0.0:8000 file:///opt/surrealdb/data/

After a while the message appears: ERROR surrealdb::api::engine::tasks: Error running node agent tick:...

However, the server remains functional and does not crash.

2024-04-26T10:06:29.509813Z  INFO surreal::env: Running 1.4.2 for linux on x86_64
2024-04-26T10:06:29.509948Z  WARN surreal::dbs: ❌🔒 IMPORTANT: Authentication is disabled. This is not recommended for production use. 🔒❌
2024-04-26T10:06:29.510061Z  INFO surrealdb_core::kvs::ds: Starting kvs store at file:///opt/surrealdb/data
2024-04-26T10:06:32.367032Z  INFO surrealdb_core::kvs::ds: Started kvs store at file:///opt/surrealdb/data
2024-04-26T10:06:32.367549Z  INFO surrealdb::net: Started web server on 0.0.0.0:8000
2024-04-26T10:09:17.715664Z ERROR surrealdb::api::engine::tasks: Error running node agent tick: Internal database error: ts is less than or equal to the latest ts

Greetings
Frank

SurrealDB version

Running 1.4.2 for linux on x86_64 (Ubuntu LTS)

@admtech admtech added bug Something isn't working triage This issue is new labels Apr 26, 2024
@vitorTheDev
Copy link

Several other people also got this error, including me. So the bug is present on windows, linux and iOS.
In my case it was after 4 hours of "inactivity", but might have had some LQs hanging...

@og-dev
Copy link

og-dev commented Apr 27, 2024

Same error here too
1.4.2 for windows on x86_64

Any info?

@kirinse
Copy link

kirinse commented Apr 27, 2024

Same here too
1.4.2 for linux on aarch64
Maybe related with Internal database error: no versionstamp associated to this timestamp exists yet when i try SHOW CHANGES FOR TABLE media since '2024-04-27T01:23:52Z'.

@sgirones
Copy link
Contributor

@mumoshu could you take a look?

@phughk
Copy link
Contributor

phughk commented May 2, 2024

Potentially related to #3906

@phughk phughk self-assigned this May 2, 2024
@phughk phughk added topic:performance Improvements to database performance topic:changefeeds This is related to changefeeds topic:live This is related to live queries and push notifications and removed triage This issue is new labels May 2, 2024
@mumoshu
Copy link
Contributor

mumoshu commented May 7, 2024

We appreciate your reporting this issue to us!

In short, this isn't an error by itself. We need to make it flow into a lower log level, like debug, trace, or something like that.
This can relate to #3906, but almost certainly cannot be the cause of it.


FWIW, SurrealDB has an internal mapping between timestamps(ts) and commit versions(we call it "vs" and "versionstamp").

You can treat it as follows:

  1. Transactions and commits are ordered by commit versions that are guaranteed to constantly increase (1, 2, 3, ... and so on).
  2. We leverage the mapping between ts and vs. to enable replaying changes since a specific "timestamp."
  3. The mapping is periodically updated in the background by trying to append the SurrealDB host's current system time to the mapping.

surrealdb::api::engine::tasks: Error running node agent tick: Internal database error: ts is less than or equal to the latest ts.

@admtech @vitorTheDev The "ERROR" (although it isn't a fundamental error as written earlier) means that 3. failed temporarily for various reasons.

It can happen when your operating system corrected the host's clock using NTP after the previous run of 3. succeeded, or you have multiple SurrealDB nodes connected to a single distributed KVS(TiKV, for example), and there are skews across nodes' clocks...

SurrealDB handles those "errors" gracefully so that any system clock skews don't break the correctness of CF or other SDB functionalities.

Internal database error: no versionstamp associated to this timestamp exists yet when i try SHOW CHANGES FOR TABLE media since '2024-04-27T01:23:52Z'.

@kirinse In addition to the above, this error on the SHOW statement can happen for various reasons, including you specified a timestamp that is too "latest," the ts<->vs mapping has not been covered yet, and/or node tick is stuck for reasons like high CPU pressure on the SDB node(s), etc.

All in all, this is fine. We need to make it flow into a lower log level, like debug, trace, or something like that, so that they don't confuse you anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic:changefeeds This is related to changefeeds topic:live This is related to live queries and push notifications topic:performance Improvements to database performance
Projects
None yet
Development

No branches or pull requests

7 participants