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

model 的事件处理貌似有问题。 #10

Open
tea-sun opened this issue Nov 9, 2024 · 0 comments
Open

model 的事件处理貌似有问题。 #10

tea-sun opened this issue Nov 9, 2024 · 0 comments

Comments

@tea-sun
Copy link

tea-sun commented Nov 9, 2024

如果在db事务中$model->save()或$mode->delete(); 会触发model事件并同步到elasticsearch, 那么如果后续由于其他原因导致db事务回滚。 那同步到elasticsearch的操作还是会继续进行的。 那么就会导致结果不同步.laravel的scout上有after commit选项。可以在定义在事务提交成功后再进行。hyperf/scout并没有这个机制.

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

No branches or pull requests

1 participant