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

updating docs to drop using --wipe flag #440

Merged
merged 4 commits into from
Aug 1, 2024
Merged

updating docs to drop using --wipe flag #440

merged 4 commits into from
Aug 1, 2024

Conversation

muhamadazmy
Copy link
Contributor

Fixes #439

Question: How to preview mdx files locally

Copy link

cloudflare-workers-and-pages bot commented Aug 1, 2024

Deploying documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd68eba
Status: ✅  Deploy successful!
Preview URL: https://2349b320.documentation-beg.pages.dev
Branch Preview URL: https://issue439.documentation-beg.pages.dev

View logs

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for updating the documentation @muhamadazmy. The changes look good to me.

For a bit of context for @gvdongen: We want to discourage the wipe command because it is a) dangerous, b) should hopefully no longer be needed with our backwards compatibility and c) wouldn't work in the distributed set up as it is implemented right now. Instead we ask people to delete the data directory manually if they really need to. The wipe command itself is still there but it is hidden now (not visible when running restate-server --help).


```shell
restate-server --wipe all
rm -rf <BASE_DIR>/${HOST}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe replace ${HOST} with <NODE_NAME>. By default <NODE_NAME> == ${HOST} but one can configure it to something else.

@@ -117,10 +117,10 @@ import clsx from "clsx";
<details>
<summary> Wiping Restate </summary>

To start the Restate Server from a clean slate and wipe ongoing invocations and K/V state:
To start the Restate Server from a clean slate, stop the server then wipe ongoing invocations and K/V state:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To start the Restate Server from a clean slate, stop the server then wipe ongoing invocations and K/V state:
To start the Restate Server from a clean slate, stop the server and then delete the data directory:

@@ -146,7 +146,7 @@ import clsx from "clsx";

[Cancel](/operate/invocation#cancelling-invocations) a single invocation or a batch of invocations.
Use `--kill` to [kill](/operate/invocation#killing-invocations) the invocation.
To remove all invocations, restart the server with `--wipe all`.
To remove all invocations, stop the server then do `rm -rf <BASE_DIR>/<NODE_NAME>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should state that this deletes all state/data of the Restate server.

@gvdongen
Copy link
Contributor

gvdongen commented Aug 1, 2024

@tillrohrmann I think there is a difference in how you use Restate locally for development/learning, vs production usage.
I think when developing locally, it's perfectly fine to use this a lot.

When developing locally, I still use it in quite some circumstances:

  • Running an example, then another example and wanting to start from a clean slate
  • Having many in flight invocations, delayed invocations and timers that I want to stop immediately to start over
  • It's still the fastest way to kill all invocations and state, if I have messed things up. We still don't have a kill all invocations command.

But yes, maybe doing rm -rf is also fine.

@muhamadazmy
Copy link
Contributor Author

@gvdongen The argument --wipe is still available and you can use it. It's just hidden for normal users, and is then removed from documentations. You still can perfectly do restate-server --wipe all .

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

LGTM. +1 for merging.

@muhamadazmy muhamadazmy merged commit fd38404 into main Aug 1, 2024
2 checks passed
@muhamadazmy muhamadazmy deleted the issue439 branch August 1, 2024 15:09
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.

update docs to drop the --wipe option
3 participants