对checkpoint not completed的理解

本文探讨了数据库中日志组切换与检查点的工作原理。重点分析了当log2切换回log1时触发检查点的过程,以及在DBWn写操作缓慢时可能出现的checkpoint not completed情况。此外还介绍了redo日志在事务处理中的作用。

如果数据库存在两个日志组log1和log2,首先。-->log1-->log2-->log1,此时(log2切换到log1)触发checkpoint。该checkpoint will flush dirty block to datafile,从而触发DBWn书写dirty buffer,等到log1覆盖的dirty block所有被写入datafile后才干使用log1(循环使用),如果DBWn写入过慢,LGWR必须等待DBWn完毕,则这时会出现“checkpoint not completed!”


别人的回答是

log1-> log2, trigger checkpoint 1
after log2 is full,
log2-> log1, trigger checkpoint 2
but if checkpoint 1 is still not finished, then LGWR must wait. This is "logfile switch (checkpoint incompleted)" event.


我的理解是

1.检查点完毕。才干顺利切换。

2.checkpoint1堵塞了log2->log1的切换。

3.没有可用的redo日志,会堵塞数据正常使用。这时数据库是短暂hang住的。(原因例如以下)


不知道对不正确,请高人指正~

Before a change is done in the buffer cache a change vector (file, block, row, value) about this change is written to the redo buffer. First the change of the undo block to be made soon is tracked (L). Then the change is done in the buffer cache (M). Then the change of the table block to be made soon is tracked (N). Then the insert to the table block is done in the buffer cache (O). All actions up to now where done by the server process (P). Finally it returns the control to the client process (Q).

redo无法试用。导致事务不能正常进行。

[INFO|<string>:438] 2025-03-04 19:33:39,759 >> Training completed. Do not forget to share your model on huggingface.co/models =) swanlab: Step 210 on key train/epoch already exists, ignored. swanlab: Step 210 on key train/num_input_tokens_seen already exists, ignored. {'train_runtime': 222.6408, 'train_samples_per_second': 7.546, 'train_steps_per_second': 0.943, 'train_loss': 3.434720888591948, 'epoch': 30.0, 'num_input_tokens_seen': 665264} 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 210/210 [03:39<00:00, 1.04s/it] [INFO|trainer.py:3942] 2025-03-04 19:33:39,764 >> Saving model checkpoint to saves/DeepSeek-R1-1.5B-Distill/lora/train_2025-03-04-19-22-19 [INFO|configuration_utils.py:697] 2025-03-04 19:33:39,782 >> loading configuration file /root/autodl-tmp/ai/models/DeepSeek-R1-Distill-Qwen-1.5B/config.json [INFO|configuration_utils.py:771] 2025-03-04 19:33:39,783 >> Model config Qwen2Config { "architectures": [ "Qwen2ForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 151643, "eos_token_id": 151643, "hidden_act": "silu", "hidden_size": 1536, "initializer_range": 0.02, "intermediate_size": 8960, "max_position_embeddings": 131072, "max_window_layers": 21, "model_type": "qwen2", "num_attention_heads": 12, "num_hidden_layers": 28, "num_key_value_heads": 2, "rms_norm_eps": 1e-06, "rope_scaling": null, "rope_theta": 10000, "sliding_window": 4096, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.49.0", "use_cache": true, "use_mrope": false, "use_sliding_window": false, "vocab_size": 151936 } ***** train metrics ***** epoch = 30.0 num_input_tokens_seen = 665264 total_flos = 5773005GF train_loss = 3.4347 train_runtime = 0:03:42.64 train_samples_per_second = 7.546 train_steps_per_second = 0.943 Figure saved at: saves/DeepSeek-R1-1.5B-Distill/lora/train_2025-03-04-19-22-19/training_loss.png [WARNING|2025-03-04 19:33:40] llamafactory.extras.ploting:162 >> No metric eval_loss to plot. [WARNING|2025-03-04 19:33:40] llamafactory.extras.ploting:162 >> No metric eval_accuracy to plot. [INFO|modelcard.py:449] 2025-03-04 19:33:40,019 >> Dropping the following result as it does not have all the necessary fields: {'task': {'name': 'Causal Language Modeling', 'type': 'text-generation'}} swanlab: Experiment dragon-6 has completed swanlab: 🌟 Run `swanlab watch /root/autodl-tmp/ai/LLaMA-Factory/swanlog` to view SwanLab Experiment Dashboard locally swanlab: 🏠 View project at https://swanlab.cn/@chrisfang/llamafactory-test swanlab: 🚀 View run at https://swanlab.cn/@chrisfang/llamafactory-test/runs/l0n927vfjxvq6iclvs3a8 优化空间
最新发布
03-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值