21 Commits

Author SHA1 Message Date
Dae S. Kim
89ab090434 Account Server: Refactor HEAD request handler
Deleted unused container checks. As method
swift::common::db::AccountBroker::get_container_timestamp becomes
unused, it is deleted too, along with the corresponding tests.

Change-Id: I61de4549b0abd7103226d6a13f1d9844abaa92d3
2013-02-26 21:42:06 +01:00
lrqrun
7b664c99e5 Fix PEP8 issues in ./test/unit/common .
Fix some pep8 issues in
       modified:   test_bufferedhttp.py
       modified:   test_constraints.py
       modified:   test_db.py
       modified:   test_db_replicator.py
       modified:   test_init.py
make the code looks pretty.

Change-Id: I1c374b1ccd4f028c4e4b2e8194a6d1c201d50571
2012-08-31 11:24:46 +08:00
gholt
9eb797b099 !! Changed db_preallocation to False
Long explanation, but hopefully answers any questions.

We don't like changing the default behavior of Swift unless there's a
really good reason and, up until now, I've tried doing this with this
new db_preallocation setting.

For clusters with dedicated account/container servers that usually
have fewer disks overall but SSD for speed, having db_preallocation
on will gobble up disk space quite quickly and the fragmentation it's
designed to fight isn't that big a speed impact to SSDs anyway.

For clusters with account/container servers spread across all servers
along with object servers usually having standard disks for cost,
having db_preallocation off will cause very fragmented database files
impacting speed, sometimes dramatically.

Weighing these two negatives, it seems the second is the lesser evil.
The first can cause disks to fill up and disable the cluster. The
second will cause performance degradation, but the cluster will still
function.

Furthermore, if just one piece of code that touches all databases
runs with db_preallocation on, it's effectively on for the whole
cluster. We discovered this most recently when we finally configured
everything within the Swift codebase to have db_preallocation off,
only to find out Slogging didn't know about the new setting and so
ran with it on and starting filling up SSDs.

So that's why I'm proposing this change to the default behavior.

We will definitely need to post a prominent notice of this change
with the next release.

Change-Id: I48a43439264cff5d03c14ec8787f718ee44e78ea
2012-05-22 00:30:47 +00:00
gholt
e7d37b1a05 Fixed inconsistent end_marker
The listing of containers was inclusive whereas the listing of
objects was exclusive. I searched and searched and only found
end_marker usage with listings of objects so I changed the listings
of containers to match that.

Change-Id: Ia8eb66a7ceaef28c698e2d4e19dd5dfd9197a911
2012-05-03 00:25:31 +00:00
gholt
0becfab629 Added option to disable SQLite db preallocation
Added option to disable SQLite db preallocation. This can be very
useful on pure ssd account/container servers where the extra space is
worth more than the lesser fragmentation.

Change-Id: I8fbb028a9b6143775b25b343e97896497a8b63a9
2012-03-28 21:45:18 +00:00
John Dickinson
1ecf5ebba1 updated copyright date for all files
Change-Id: Ifd909d3561c2647770a7e0caa3cd91acd1b4f298
2012-03-19 13:45:34 -05:00
lzyeval
8b09723a00 PEP8 swift cleanup
The None, True, and False values are singletons.

All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
All Object type comparisons should use isinstance()
instead of comparing types directly.

Change-Id: I47863c4862791022670619f19b8bc15d8a93fd81
2012-01-04 14:53:53 +08:00
John Dickinson
57a4e509f3 improved delete db test 2011-08-29 13:04:20 -05:00
John Dickinson
6f854676f1 deleting a db now also clears the db's metadata 2011-08-29 10:58:07 -05:00
gholt
c9cd011c46 Minor fix of quarantine naming 2011-08-12 18:29:16 +00:00
gholt
3628c08b3e Real files for bad databases. 2011-08-02 18:21:25 +00:00
gholt
a68e5d883c Fixed test based on testdir 2011-08-01 21:14:41 +00:00
gholt
671117e1d9 Tests for db quarantining 2011-08-01 20:46:30 +00:00
gholt
81c6ca0b2c Merged from trunk 2011-05-11 02:51:31 +00:00
David Goetz
86cb12036b removing blank excepts 2011-01-26 14:31:33 -08:00
Anne Gentle
8823427161 Changed copyright notices on py files and the single rst file with a copyright notice 2011-01-04 17:34:43 -06:00
John Dickinson
78a150751d changed end_marker to not be inclusive 2010-11-29 10:58:23 -06:00
John Dickinson
041a46eb7b added end_marker query parameter to container and object listings 2010-11-12 10:55:32 -06:00
gholt
e8d3f260b9 Expose account/container metadata facility to external API 2010-08-16 15:30:27 -07:00
gholt
15009bb76e Added metadata to account and container servers 2010-08-10 12:18:15 -07:00
Chuck Thier
001407b969 Initial commit of Swift code 2010-07-12 17:03:45 -05:00