bkietz commented on code in PR #38797:
URL: https://github.com/apache/arrow/pull/38797#discussion_r1406233011


##########
go/arrow/datatype_fixedwidth.go:
##########
@@ -398,10 +402,20 @@ func (t *TimestampType) ClearCachedLocation() {
 // so if you change the value of TimeZone after calling this, make sure to call
 // ClearCachedLocation.
 func (t *TimestampType) GetZone() (*time.Location, error) {
+       t.mx.RLock()
        if t.loc != nil {
+               defer t.mx.RUnlock()
                return t.loc, nil
        }
 
+       t.mx.RUnlock()
+       t.mx.Lock()
+       defer t.mx.Unlock()
+       // in case we got run in between releasing the read lock and

Review Comment:
   Nit:
   ```suggestion
        // in case GetZone() was called in between releasing the read lock and
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to