Changeset 23725
- Timestamp:
- Apr 7, 2009, 1:48:25 PM (17 years ago)
- Location:
- branches/neb_distrib_20081210/Nebulous-Server
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
lib/Nebulous/Server.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/neb_distrib_20081210/Nebulous-Server/Changes
r23715 r23725 9 9 - attempt to optimize _is_valid_object_key() by eliminating an unused join 10 10 - rename Nebulous::Keys class -> Nebulous::Key 11 - select neb db to use by hashing only the directory component of the key 11 12 12 13 0.16 -
branches/neb_distrib_20081210/Nebulous-Server/lib/Nebulous/Server.pm
r23718 r23725 79 79 # only use the first 8 hex chars... have to be careful to avoid an int 80 80 # overflow here 81 # XXX this needs to be modified to follow my key prescription: 82 # neb://host/path/path/filename.ext -> use path/path/filename (ignore neb://host and .ext)83 # EAM : test to double-check hashing behavior84 $db_index = unpack("h8", sha1_hex( "$key")) % $config->n_db;81 82 # hash only the directory component of the path and not the filename 83 my $path = dirname($key->path); 84 $db_index = unpack("h8", sha1_hex($path)) % $config->n_db; 85 85 86 86 return $db_index;
Note:
See TracChangeset
for help on using the changeset viewer.
