fix(bigtable): Allow GC updates on emulated aggregate column family#11499
Conversation
| return nil, status.Errorf(codes.InvalidArgument, "Immutable fields 'value_type.aggregate_type' cannot be updated") | ||
| } | ||
|
|
||
| if newcf.valueType == nil { |
There was a problem hiding this comment.
This condition needs to be changed.
Right now, column family has only two fields that can be updated. So, it makes sense to assume that when a field is nil, it is not getting updated and the other one is. This is not future compatible in the scenario where more fields get added to column family.
google-cloud-go/bigtable/admin/apiv2/adminpb/table.pb.go
Lines 953 to 976 in a2a926d
Instead, use the UpdateMask field. As documented here, read the updatemask from the req. Then, check if it is nil. If it is nil, assume it is updating gcrule.
There was a problem hiding this comment.
Thank you, this was extremely helpful! I've just pushed some changes that will allow for partial updates of the column family based on the UpdateMask, as well as some additional tests to validate the expected behavior of the UpdateMask in this case. Please let me know if there's anything else I need to change.
2bef391 to
087ebb2
Compare
087ebb2 to
e52fc23
Compare
|
Thanks for adding update mask support! |
Closes #11498: