@@ -444,7 +444,7 @@ func FilterMissingResourceError(sync ResourceVoider, err *error) {
444444
445445// In the Exadata case the service return the hostname provided by the service with a suffix
446446func dbSystemHostnameDiffSuppress (key string , old string , new string , d * schema.ResourceData ) bool {
447- return EqualIgnoreCaseSuppressDiff (key , old , new , d ) || newIsPrefixOfOldDiffSuppress (key , old , new , d )
447+ return EqualIgnoreCaseSuppressDiff (key , old , new , d ) || NewIsPrefixOfOldDiffSuppress (key , old , new , d )
448448}
449449
450450func NewIsPrefixOfOldDiffSuppress (key string , old string , new string , d * schema.ResourceData ) bool {
@@ -635,3 +635,24 @@ func convertResourceFieldsToDatasourceFields(resourceSchema *schema.Resource) *s
635635
636636 return resourceSchema
637637}
638+
639+ func getRetryPolicyWithAdditionalretryCondition (timeout time.Duration , retryConditionFunction func (oci_common.OCIOperationResponse ) bool , service string ) * oci_common.RetryPolicy {
640+ startTime := time .Now ()
641+ // wait for status of the database to not be UPDATING
642+ return & oci_common.RetryPolicy {
643+ ShouldRetryOperation : func (response oci_common.OCIOperationResponse ) bool {
644+ if shouldRetry (response , false , service , startTime ) {
645+ return true
646+ }
647+ if retryConditionFunction (response ) {
648+ timeWaited := getElapsedRetryDuration (startTime )
649+ return timeWaited < timeout
650+ }
651+ return false
652+ },
653+ NextDuration : func (response oci_common.OCIOperationResponse ) time.Duration {
654+ return getRetryBackoffDuration (response , false , service , startTime )
655+ },
656+ MaximumNumberAttempts : 0 ,
657+ }
658+ }
0 commit comments