[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-12。"],[[["\u003cp\u003eA stream's lifecycle begins with creation, resulting in a \u003ccode\u003eNot started\u003c/code\u003e status, and it progresses through states like \u003ccode\u003eStarting\u003c/code\u003e and \u003ccode\u003eRunning\u003c/code\u003e as it's initiated and validated.\u003c/p\u003e\n"],["\u003cp\u003ePausing a \u003ccode\u003eRunning\u003c/code\u003e stream transitions it to \u003ccode\u003eDraining\u003c/code\u003e, where remaining data is processed, before finally reaching the \u003ccode\u003ePaused\u003c/code\u003e state.\u003c/p\u003e\n"],["\u003cp\u003eStreams can be modified or deleted at any point, offering flexibility in managing their operation.\u003c/p\u003e\n"],["\u003cp\u003eIf a \u003ccode\u003eRunning\u003c/code\u003e stream encounters errors, it may transition to a \u003ccode\u003eFailed\u003c/code\u003e state (recoverable) or \u003ccode\u003eFailed permanently\u003c/code\u003e state (unrecoverable), requiring manual intervention in the latter case.\u003c/p\u003e\n"],["\u003cp\u003eWhen a \u003ccode\u003eFailed\u003c/code\u003e stream is addressed, it will automatically try to resume running, and when a \u003ccode\u003ePaused\u003c/code\u003e stream is resumed it will go to a \u003ccode\u003eRunning\u003c/code\u003e state.\u003c/p\u003e\n"]]],[],null,["# Stream lifecycle\n\nThe following diagram shows the various states and transitions in the lifecycle of a stream.\n\n\u003cbr /\u003e\n\n| In this diagram, the upside-down trapezoid boxes represent actions that the user performs with the stream, and the rectangle boxes represent the resultant states of the stream based on the user's actions.\n\n\u003cbr /\u003e\n\nFirst, you [create a stream](/datastream/docs/create-a-stream). Datastream uses this stream to transfer data from a source database into a destination. After the stream is created, the state of the stream is `Not started`.\n\nAfter creating the stream, you [start it](/datastream/docs/run-a-stream#startastream). The status of the stream changes to `Starting`. This signifies that the stream is in the process of being started and validated.\n\n- If the stream is valid, then the status of the stream changes from `Starting` to `Running`.\n- If the stream isn't valid, then the status of the stream changes from `Starting` back to `Not started`. You can then [rectify the problems of the stream](/datastream/docs/troubleshoot-a-stream). For example, if errors are associated with the connectivity information of the stream, then modify the stream definition. After resolving all problems of the stream, start it again, and the status changes to `Starting`, and then to `Running`.\n\nYou can [pause a stream](/datastream/docs/run-a-stream#pauseastream). When a stream is paused, Datastream doesn't pull any new data from the source database into the destination. However, some data may continue to be written to the destination because *in flight* data continues to flow.\n\nTherefore, after you pause a stream, the status of the stream changes from `Running` to `Draining`. Draining a stream is the process of emptying the stream so that it doesn't contain any data. After the stream is drained of all data, then the status of the stream changes from `Draining` to `Paused`.\n\nWhen you [resume a paused stream](/datastream/docs/run-a-stream#resumeastream), the status of the stream changes from `Paused` to `Running`.\n\nThere are two actions that you can perform at any time during the lifecycle of the stream:\n\n- [Modify the stream](/datastream/docs/modify-a-stream). Any changes that you make to it take effect immediately.\n- [Delete the stream](/datastream/docs/delete-a-stream) after you no longer need it.\n\nStream errors\n-------------\n\nA running stream can encounter errors which might cause the stream to change its state to `Failed` or `Failed permanently`:\n\n- A `Failed` status means that the stream encountered a recoverable error. This means that the stream is either still active, or continuously attempting to run.\n- A `Failed permanently` stream is a stream that ran into an unrecoverable error which prevents it from continuing to run. Such errors might cause data loss.\n\nYou can address the issues for a `Failed` stream, and the stream automatically resumes. Its state changes from `Failed` back to `Running`. For more information, see [Troubleshoot a stream](/datastream/docs/troubleshoot-a-stream).\n\nYou can manually recover a `Failed permanently` stream. For more information, see [Recover a stream](/datastream/docs/troubleshoot-a-stream).\n\nWhat's next\n-----------\n\n- For information about running a stream, see [Run a stream](/datastream/docs/run-a-stream).\n- For information about modifying your streams, see [Modify a stream](/datastream/docs/modify-a-stream).\n- For information about troubleshooting a stream, see [Troubleshoot a stream](/datastream/docs/troubleshoot-a-stream).\n- For information about recovering a stream, see [Recover a stream](/datastream/docs/recover-a-stream).\n- For information about deleting a stream, see [Delete a stream](/datastream/docs/delete-a-stream)."]]