Skip to content

Commit a56b4aa

Browse files
author
Shashank Khare
committed
Fix pycodestyle issue
1 parent 9617a6a commit a56b4aa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

arctic/serialization/incremental.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ def _calculate_rows_per_chunk(max_chunk_size, chunk):
148148
sze = sze if sze < max_chunk_size else max_chunk_size
149149
rows_per_chunk = int(max_chunk_size / sze)
150150
if rows_per_chunk < 1 and ARCTIC_AUTO_EXPAND_CHUNK_SIZE:
151-
# If a row size is larger than chunk_size, use the maximum document size
152-
logging.warning('Chunk size of {} is too small to fit a row ({}). '
153-
'Using maximum document size.'.format(max_chunk_size, MAX_DOCUMENT_SIZE))
154-
# For huge rows, fall-back to using a very large document size, less than max-allowed by MongoDB
155-
rows_per_chunk = int(MAX_DOCUMENT_SIZE / sze)
151+
# If a row size is larger than chunk_size, use the maximum document size
152+
logging.warning('Chunk size of {} is too small to fit a row ({}). '
153+
'Using maximum document size.'.format(max_chunk_size, MAX_DOCUMENT_SIZE))
154+
# For huge rows, fall-back to using a very large document size, less than max-allowed by MongoDB
155+
rows_per_chunk = int(MAX_DOCUMENT_SIZE / sze)
156156
if rows_per_chunk < 1:
157157
raise ArcticSerializationException("Serialization failed to split data into max sized chunks.")
158158
return rows_per_chunk

arctic/store/_ndarray_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def _do_write(self, collection, version, symbol, item, previous_version, segment
686686
set_spec['$set'] = segment
687687
bulk.append(pymongo.UpdateOne(segment_spec, set_spec, upsert=True))
688688
elif ARCTIC_FORWARD_POINTERS_CFG is FwPointersCfg.HYBRID:
689-
bulk.append(pymongo.UpdateOne(segment_spec, set_spec))
689+
bulk.append(pymongo.UpdateOne(segment_spec, set_spec))
690690
# With FwPointersCfg.ENABLED we make zero updates on existing segment documents, but:
691691
# - write only the new segment(s) documents
692692
# - write the new version document

0 commit comments

Comments
 (0)