Skip to content

Instantly share code, notes, and snippets.

@zaitcev
zaitcev / swauth-gi33-1.diff
Created May 23, 2012 04:14
patch for issue gi:33
commit 1445b7466f32400fffcc07d453be8f72b9920d74
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Tue May 22 22:06:15 2012 -0600
Add README.md to MANIFEST.in
diff --git a/MANIFEST.in b/MANIFEST.in
index b69e1c9..c73869e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
[zaitcev@lembas swift-fetch]$ git review -d 44097
Downloading refs/changes/97/44097/18 from gerrit
Switched to branch "review/peter_portante/ts"
[zaitcev@lembas swift-fetch]$ git branch -a
master
review/chuck_thier/memcache_conns
review/clay_gerrard/open-instead-of-init
review/fabien_boucher/bug/1210045
review/pete_zaitcev/be/split
review/peter_portante/ondisk
@zaitcev
zaitcev / swift-be-calls.txt
Created March 22, 2014 01:01
Semantic diff for PBE from the standpoint of Broker/Backend API in the servers
Semanic diff for https://review.openstack.org/47713
Use 142 columns
Use '*' in vi to highlight broker
## Account (HEAD) ## Account (PBE)
class AccountController(object): class AccountController(object):
def HEAD(self, req): def HEAD(self, req):
broker = self._get_account_broker(drive, part, account, ...) broker = self.get_account_backend(drive, part, account,...)
@zaitcev
zaitcev / rgw.trace.txt
Created June 24, 2015 05:27
rgw.trace.txt 1
v1
## Down the rabbit hole
- check out Yehuda's branch
- "swift and s3 have separate url-to-object translations" - ?
class rgw_obj # rgw_common.h
std::string loc;
class RGWGetObj : public RGWOp # rgw_op.h
rgw_obj obj;
map<string, bufferlist> attrs;
@zaitcev
zaitcev / rgw.trace.txt
Created June 27, 2015 00:22
rgw.trace.txt 2
v2
## Down the rabbit hole
- check out Yehuda's branch
- "swift and s3 have separate url-to-object translations" - ?
class rgw_obj # rgw_common.h
std::string loc;
class RGWGetObj : public RGWOp # rgw_op.h
rgw_obj obj;
map<string, bufferlist> attrs;
@zaitcev
zaitcev / ceph-p7408-2.diff
Created January 30, 2016 03:48
Counter-proposal for pull/7408
commit 2213f9db9f87ee75203980784d8ea43d882cf2e2
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Fri Jan 29 20:43:43 2016 -0700
Counter-fix for pull/7408
diff --git a/src/rgw/rgw_rest_metadata.h b/src/rgw/rgw_rest_metadata.h
index 7f3cf1f..e68f9d3 100644
--- a/src/rgw/rgw_rest_metadata.h
+++ b/src/rgw/rgw_rest_metadata.h
@zaitcev
zaitcev / swift-c347498-x1.diff
Created July 27, 2016 16:31
Alternative for c/347498
See https://review.openstack.org/347498
monkey_patch_mimetools() now does nothing on py3
diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py
index 88e61f2..f018cd1 100644
--- a/swift/common/wsgi.py
+++ b/swift/common/wsgi.py
@@ -22,7 +22,6 @@ import inspect
import os
import signal
commit 065a697f5537454123479a8929e0c6d8492d5c8d
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Wed Jan 18 23:27:40 2017 -0700
Embrio of new POST /a/c/object
diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py
index d6aec48..bf25d90 100644
--- a/swift/obj/diskfile.py
+++ b/swift/obj/diskfile.py
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index 08cd7b2..3288fcd 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -297,6 +297,10 @@ class LengthWrapper(object):
if self._remaining <= 0:
return ''
+ # Thank Martin v. Loewis for this.
+ if size == 8192:
commit 5b4e5617096d984e2633f4697002a9592f564d12
Author: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Wed Jun 14 22:28:13 2017 -0600
Buffer reads from disk (alt 1)
Otherwise, Python defaults to 8k reads which seems kinda terrible.
As a side-effect, get more picky about the types of input we wrap. While
you can still send unicode that can be encoded to ASCII, any other