Revision 8efd183f

b/snf-pithos-app/README
40 40
PITHOS_BACKEND_QUEUE_CONNECTION  None                                              Format like ``rabbitmq://guest:guest@localhost:5672/pithos``
41 41
PITHOS_BACKEND_QUOTA             50 GB (50 * 1024 ** 3)                            Default user quota
42 42
PITHOS_BACKEND_VERSIONING        auto                                              Default versioning policy for containers
43
PITHOS_UPDATE_MD5                True                                              Update object checksums when using hashmaps
43 44
===============================  ================================================  ============================================================
44 45

  
45 46
Administrator functions
b/snf-pithos-app/conf/20-snf-pithos-app-settings.conf
27 27
#PITHOS_BACKEND_QUOTA = 50 * 1024 * 1024 * 1024
28 28
#PITHOS_BACKEND_VERSIONING = 'auto'
29 29

  
30
# Disable if checksums are not required or are computed asynchronously by an external process.
31
#PITHOS_UPDATE_MD5 = True
b/snf-pithos-app/pithos/api/functions.py
52 52
    validate_modification_preconditions, validate_matching_preconditions, split_container_object_string,
53 53
    copy_or_move_object, get_int_parameter, get_content_length, get_content_range, socket_read_iterator,
54 54
    SaveToBackendHandler, object_data_response, put_object_block, hashmap_md5, simple_list_response, api_method)
55
from pithos.api.settings import AUTHENTICATION_URL, AUTHENTICATION_USERS, COOKIE_NAME
55
from pithos.api.settings import AUTHENTICATION_URL, AUTHENTICATION_USERS, COOKIE_NAME, UPDATE_MD5
56 56

  
57 57
from pithos.backends.base import NotAllowedError, QuotaError
58 58
from pithos.backends.filter import parse_filters
......
884 884
        raise BadRequest('Invalid sharing header')
885 885
    except QuotaError:
886 886
        raise RequestEntityTooLarge('Quota exceeded')
887
    if not checksum:
887
    if not checksum and UPDATE_MD5:
888 888
        # Update the MD5 after the hashmap, as there may be missing hashes.
889 889
        checksum = hashmap_md5(request, hashmap, size)
890 890
        try:
......
1187 1187
    if dest_bytes is not None and dest_bytes < size:
1188 1188
        size = dest_bytes
1189 1189
        hashmap = hashmap[:(int((size - 1) / request.backend.block_size) + 1)]
1190
    checksum = hashmap_md5(request, hashmap, size)
1190
    checksum = hashmap_md5(request, hashmap, size) if UPDATE_MD5 else ''
1191 1191
    try:
1192 1192
        version_id = request.backend.update_object_hashmap(request.user_uniq,
1193 1193
                        v_account, v_container, v_object, size, prev_meta['type'],
b/snf-pithos-app/pithos/api/settings.py
36 36
BACKEND_QUOTA = getattr(settings, 'PITHOS_BACKEND_QUOTA', 50 * 1024 * 1024 * 1024)
37 37
BACKEND_VERSIONING = getattr(settings, 'PITHOS_BACKEND_VERSIONING', 'auto')
38 38

  
39
# Update object checksums when using hashmaps.
40
UPDATE_MD5 = getattr(settings, 'PITHOS_UPDATE_MD5', True)
41

  

Also available in: Unified diff