colopl / laravel-spanner

Laravel database driver for Google Cloud Spanner
Apache License 2.0
97 stars 16 forks source link

Add Support maxCommitDelay when insert and update #205

Closed b141568 closed 1 month ago

b141568 commented 7 months ago

Hello

I noticed that Google recently released capacity-optimized recordings.

We can adjust the maximum writing delay, at the cost of increasing computational usage.

It would be very interesting if it were possible to define a default value in config.database or as a function during the querybuilder.

This can help with systems that need to work with less delay.

Source: https://cloud.google.com/spanner/docs/throughput-optimized-writes

https://github.com/googleapis/google-cloud-php/blob/e22a5b45bd70c3cc27887d498e7a7d149de86b7b/Spanner/src/Operation.php#L127

taka-oyama commented 1 month ago

After #229 is merged, it will be possible to set commit options (which contains maxCommitDelay).