#tf-data-service Fix a race condition when loading element_spec file.
#tf-data-service Fix a race condition when loading element_spec file.

The element_spec file can be empty when it is being written. If it is
read while being written, race conditions can occur:
```
No encoder for object  of type <class 'google3.third_party.tensorflow.core.protobuf.struct_pb2.StructuredValue'>.
```
