Skip to content

Commit

Permalink
BugFix: Updating read and write quotas in cluster.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Aug 26, 2024
1 parent 09c04bb commit 10b385f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions accesscontrol/access_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,16 @@ func (roleCreate AerospikeRoleCreateUpdate) UpdateRole(
}
}

if role.ReadQuota != roleCreate.ReadQuota || role.WriteQuota != roleCreate.WriteQuota {
if err := client.SetQuotas(
adminPolicy, roleCreate.Name, roleCreate.ReadQuota, roleCreate.WriteQuota,
); err != nil {
return fmt.Errorf(
"error setting quotas for role %s: %v", roleCreate.Name, err,
)
}
}

logger.Info("Updated role", "role name", roleCreate.Name)

return nil
Expand Down

0 comments on commit 10b385f

Please sign in to comment.