Skip to content

Instantly share code, notes, and snippets.

Created October 31, 2014 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/059aced966b75dbcc486 to your computer and use it in GitHub Desktop.
Save anonymous/059aced966b75dbcc486 to your computer and use it in GitHub Desktop.
Disable container db updates in swift-on-file
$ git diff
diff --git a/swiftonfile/swift/obj/server.py b/swiftonfile/swift/obj/server.py
index cec3809..8e2a252 100644
--- a/swiftonfile/swift/obj/server.py
+++ b/swiftonfile/swift/obj/server.py
@@ -59,9 +59,20 @@ class ObjectController(server.ObjectController):
return self._diskfile_mgr.get_diskfile(
device, partition, account, container, obj, policy_idx, **kwargs)
+ def container_update(self, *args, **kwargs):
+ """
+ Update the container when objects are updated.
+
+ For Gluster, this is just a no-op, since a container is just the
+ directory holding all the objects (sub-directory hierarchy of files).
+ """
+ self.logger.warn("No-op container update")
+ return
+
@public
@timing_stats()
def PUT(self, request):
+ self.logger.warn("SwiftOnFile PUT")
try:
server.check_object_creation = \
swiftonfile.swift.common.constraints.sof_check_object_creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment