aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLXAssetData.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-03-15Change the table and field names of XAssetService mysql db tables to be ↵Justin Clark-Casey (justincc)1-47/+45
capitalized like Avatars, Friends, etc. Also fixes access time being set on assets rather than XAssetsMeta This is to try and be somewhat consistent with other service tables that are mainly in this style. No migration is supplied, since nobody should be using this service yet except on a test basis.
2013-03-15Implement access time updates on assets for XAssetService.Justin Clark-Casey (justincc)1-38/+57
This only happens if access time is older than 30 days currently, in order to reduce database updates. The idea is to give some idea of assets which haven't been accessed for a very, very long time. These might conceivably be deleteable, though this will be a risk due to caching at other points in the chain. This is actually currently much less useable on the xasset service since access time is on metadata rather than the data itself. And many metadata entries may point to the same data. Probably need to address this.
2013-02-27Add more information to warnings logged when asset names and descriptions ↵Justin Clark-Casey (justincc)1-2/+6
have to be truncated for database storage On balance, I still think this is useful because asset names and descriptions can sometimes be helpful in determining what things are. Even though they are never subsequently (inventory names/descriptions are always used instead).
2012-03-19Fix configuration problems where XAssetDatabasePlugin was picked up ↵Justin Clark-Casey (justincc)1-11/+11
accidentally. The asset data plugin now implements IXAssetData rather than IAssetData so the ordinary AssetService should no longer pick it up. This replaces the changes in 92b1ade. There is no longer any need to adjust your StandaloneCommon.ini/Robust.ini/Robust.HG.ini files. This may explain very recent issues in the last few weeks where textures have been disappearing or turning white (as they were going to different places). Unfortunately, you will need to rollback to an earlier database backup or reupload the textures.
2012-03-12Rename the stream extension method WebUtil.CopyTo() to WebUtil.CopyStream().Robert Adams1-1/+1
.NET 4.0 added the method Stream.CopyTo(stream, bufferSize). For .NET 3.5 and before, WebUtil defined an extension method for Stream with the signature Stream.CopyTo(stream, maxBytesToCopy). The meaning of the second parameter is different in the two forms and depending on which compiler and/or runtime you use, you could get one form or the other. Crashes ensue. This change renames the WebUtil stream copy method to something that cannot be confused with the new CopyTo method defined in .NET 4.0.
2012-03-09minor: move some compression related var setup inside compression if/then switchJustin Clark-Casey (justincc)1-4/+3
2012-03-09Put big fat EXPERIMENTAL warning in xassetservice database pluginJustin Clark-Casey (justincc)1-0/+10
This should not currently be used in any circumstances except for experimentation. Database tables used by this plugin can still change at any time with no migration path.
2012-03-06Switch to sha256 from sha1 in order to avoid future asset hash collisions.Justin Clark-Casey (justincc)1-7/+15
Some successful collision attacks have been carried out on sha1 with speculation that more are possible. http://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_algorithms No successful attacks have been shown on sha256, which makes it less likely that anybody will be able to engineer an asset hash collision in the future. Tradeoff is more storage required for hashes, and more cpu to hash, though this is neglible compared to db operations and network access.
2012-03-05remove unnecessary hash local variableJustin Clark-Casey (justincc)1-2/+0
2012-03-03Make asset compression optional. Currently set to false and not ↵Justin Clark-Casey (justincc)1-16/+24
configurable from outside MySQLXAssetData.
2012-03-03Implement basic gzip compression for xassetdataJustin Clark-Casey (justincc)1-10/+41
Whether this is worthwhile is debatable since here we are not transmitting data over a network In addition, jpeg2000 (the biggest data hog) is already a compressed image format. May not remain.
2012-03-03If asset data already exists with the required hash then don't rewrite itJustin Clark-Casey (justincc)1-17/+59
2012-03-02Perform asset storage transactionallyJustin Clark-Casey (justincc)1-57/+69
2012-03-02Make xassetservice execute one query to retrieve the asset, not twoJustin Clark-Casey (justincc)1-28/+4
2012-03-02Make XAssetService a de-duplicating asset service.Justin Clark-Casey (justincc)1-59/+106
This is an extremely crude implemenation which almost works by accident. Nevertheless it does work. It can be tested with the instructions at http://opensimulator.org/wiki/Feature_Proposals/Deduplicating_Asset_Service#Testing It does not interact at all with the existing asset service or any data stored there. This code is subject to change without notice and should not be used for anything other than gawking.
2011-08-17In the asset service, check that an asset exists before attempting to store it.Justin Clark-Casey (justincc)1-2/+7
2011-03-08Pull up Assembly of the MySQL classes as a protected property, so that it ↵Diva Canto1-4/+6
can be overwritten in subclasses. That way extensions can decide in which assembly migration resources should be looked up. This is just a refactor -- no functional changes whatsoever.
2010-09-11Re-enabled asset last access time logging in MySQLJohn Hurliman1-3/+0
2010-05-19MySQLAssetData.cs now supports asset_flags, CreatorIDAlexRa1-5/+7
2010-05-19Some more corrections after MySQL connector updateAlexRa1-1/+2
2010-05-09* Fixed spamming the assets table with map tiles. The tile image ID is now ↵Diva Canto1-2/+3
stored in regionsettings. Upon generation of a new tile image, the old one is deleted. Tested for SQLite and MySql standalone. * Fixed small bug with map search where the local sim regions weren't found.
2010-05-09Implement the "delete" path for assets. Adds a new option to allow remote ↵Melanie1-0/+18
asset deletion in robust handler.
2010-05-09Add a field asset_flags and a corresponding enum to the asset database. ThisMelanie1-3/+5
CHANGES THE ASSET SERVER PROTOCOL and means you CAN NOT MIX PRIOR VERSIONS WITH LATER ONES. It may also eat your babies, yada, yada, yada. The usual cautions for migrations to the assets table apply. Coding: Can not guarantee nut free.
2010-02-22Changed asset CreatorID to a stringJohn Hurliman1-1/+1
2010-02-22* Adds CreatorID to asset metadata. This is just the plumbing to support ↵John Hurliman1-1/+1
CreatorID, it doesn't modify database backends or OAR files to support storing/loading it
2010-02-05Updated MySQL connection management to use the MySQL connection pooling. ↵Master ScienceSim1-197/+158
This should accommodate various timeout problems that exist with the current connection pool code in a more general and standard way.
2009-11-05Changing the AssetBase constructors to avoid initializing assets with an ↵John Hurliman1-4/+1
unknown asset type, and log an error if it ever does happen
2009-11-02Reverting the memory leak patch for MySQL. Problems have been reported with ↵John Hurliman1-47/+55
the grid server after running for several hours
2009-10-25Changing Scene.ForEachClient to use the synchronous for loop instead of ↵John Hurliman1-3/+0
Parallel. This is quite possibly the source of some deadlocking, and at the very least the synchronous version gives better stack traces * Lock the LLUDPClient RTO math * Add a helper function for backing off the RTO, and follow the optional advice in RFC 2988 to clear existing SRTT and RTTVAR values during a backoff * Removing the unused PrimitiveBaseShape.SculptImage parameter * Improved performance of SceneObjectPart instantiation * ZeroMesher now drops SculptData bytes like Meshmerizer, to allow the texture data to be GCed * Improved typecasting speed in MySQLLegacyRegionData.BuildShape() * Improved the instantiation of PrimitiveBaseShape
2009-10-14* Replaced (possibly broken?) math for calculating the unix timestamp in ↵John Hurliman1-5/+5
MySQLAssetData with Utils.DateTimeToUnixTime() * Disabled UpdateAccessTime() function since it was only writing zeros anyways. This gave me a significant performance improvement for startup times and avatar logins in standalone mode * Load attachments asynchronously so avatars with lots of attachments don't have to race the timeout clock to login
2009-10-06* Continued work on the new LLUDP implementation. Appears to be functioning, ↵John Hurliman1-4/+2
although not everything is reimplemented yet * Replaced logic in ThreadTracker with a call to System.Diagnostics that does the same thing * Added Util.StringToBytes256() and Util.StringToBytes1024() to clamp output at byte[256] and byte[1024], respectively * Fixed formatting for a MySQLAssetData error logging line
2009-10-04* MySQL data tests now pass by fixing a bad fix for a bad cast on the asset ↵John Hurliman1-54/+48
Local member in MySQLAssetData * First pass at applying the using(){} pattern to IDisposable objects. Always use the using pattern on IDisposable objects whenever possible, do not manually call .Close() or .Dispose() unless there is no other way to write the code. This pass mostly covers OpenSim.Data.MySQL, and should have no functional change (tests still pass)
2009-10-01Formatting cleanup.Jeff Ames1-1/+1
2009-08-21Fix issue where conversion of temporary boolean variable fails on MySQLArthur Valadares1-2/+2
2009-08-19* Switching IAssetData to follow the new naming schema, removing the ↵Kunnis1-11/+2
separate insert and update methods.
2009-08-16* Fixed MySQL/MySQLAssetData.cs to properly do updates * Removed an extra ↵Kunnis1-8/+1
parameter from MySQL/MySQLInventoryData.cs * Fixed a bug in SQLite/SQLiteAssetData.cs that was causing a NRE when updating an asset. * Improved the BasicAssetTest.cs to do full create/update/get testing * Improved the BasicInventoryTest.cs to do full create/update/get of both a folder and an item * Moved the null ref tests to the start of the PropertyCompareConstraint.cs, so that it doesn't throw when passing in a null item
2009-08-16Adding in Reflection-based testing, to ensure that all properties are covered.Kunnis1-0/+1
2009-07-24* Apply asset and inventory name and description bound checks to MySQLJustin Clarke Casey1-2/+16
2009-06-01Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames1-1/+1
LICENSE.txt.
2009-04-13* Some more experimental work on distributed assets. Nothing hotwired yet.lbsa711-17/+19
* Introduced preprocess step in FetchAsset (Might revert this later) * Some minor CCC * Added actual implementation of GetUserProfile( uri ) and the corresponding handler to OGS1. * Introduced non-functioning GetUserUri( userProfile) awaiting user server wireup (this might move elsewhere)
2009-04-09* Improve inventory uuid conversions to make sure that we aren't converting ↵Justin Clarke Casey1-1/+1
anything that already contains a - * Among other things, this means that if a migration is interrupted, it can simply be retried
2009-03-09Implemented FetchAssetMetadataSet in DB backends.Mike Mazur1-0/+51
This method fetches metadata for a subset of the entries in the assets database. This functionality is used in the ForEach calls in the asset storage providers in AssetInventoryServer. With this implemented, frontends such as the BrowseFrontend should now work. - MySQL: implemented, sanity tested - SQLite: implemented, sanity tested - MSSQL: implemented, not tested - NHibernate: not implemented
2009-02-17- remove the Metadata property from AssetBase and return all previousMike Mazur1-17/+17
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
2009-02-12* optimized usings.lbsa711-7/+5
2009-02-04- add OpenSim.Framework.AssetMetadata class. AssetBase is now composed of itMike Mazur1-17/+17
- trim trailing whitespace
2009-02-03Rename IAssetProviderPlugin to IAssetDataPlugin aligning with the other data ↵Mike Mazur1-1/+1
plugins.
2009-01-28Slight cleanup of docs, removing trailing whitespace.Mike Mazur1-6/+5
2009-01-18Avoid an invalid cast on legacy dataMelanie Thielker1-1/+8
2008-12-22Update the MySQL connector to 5.2.5. Fixes Mantids#2673. Thanks for the ↵Homer Horwitz1-1/+1
hint, jhurliman.
2008-11-06add create_time and access_time to asset db for mysql, as wellSean Dague1-2/+46
as the code to update these at the appropriate time. This isn't surfaced in AssetBase yet. Change the replace into to an insert into for asset create. Assets are not supposed to be updatable, and the replace into is more expensive. From: Sean Dague <sdague@gmail.com>