CopyFile operation command on Raven FS leaves source files with 0 bytes - 3.5.4-patch35194, 3.5.3

瀏覽次數:29 次
跳到第一則未讀訊息

Sri

未讀,
2017年4月25日 清晨6:54:432017/4/25
收件者:RavenDB - 2nd generation document database
Release Version - Server Build #3.5.4-patch35194 or 3.5.3  (tested on both versions)

We have a web service which wraps raven FS operations, all interaction to raven is through this service. The only aspect of Raven we use is Raven FS 
We create filesystems with the encryption bundle (AlgorithmTypeSetting is System.Security.Cryptography.AesCryptoServiceProvider, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
We use Esent storage engine, the default mechanism so far.

Use case - Create a copy of the file within a file system on RavenFS server

To test the problem highlighted, We have two operations on this service

- CopyFileUsingClient - Downloads the file to the calling code, and sends it back to Raven to a new location in the file system
calls DownloadAsync command for a file in a filesystem gets the byte array
Sends the byte array to be stored to a new location using RegisterUpload and SaveChangesAsync 
Results : With voron storage engine or the esent storage , the copy of the files are created successfully, and source and destination files are intact
- CopyFileOnServer - Uses the Raven Servers new copyAsync operation as below 
using (var session = FileStoreFactory.Store.OpenAsyncSession(storeName))
{
await session.Commands.CopyAsync(sourceFileUri, targetFileUri);
}

Results : With Voron or Esent, the copy of the files are created successfully, source files are 0 bytes, destination files are fine.
e.g FileA copied to FileB , FileA ends up being zero bytes, (download from manmagement studio or API the result is the same - no bytes returned by RavenFS)
I am not sure if the tests you have check if the source file was left intact, but this is where the issue is.

ar...@ayende.com

未讀,
2017年4月25日 上午8:44:392017/4/25
收件者:RavenDB - 2nd generation document database
Hi,

I've tried to reproduce that using FS encrypted by AesCryptoServiceProvider algorithm but didn't see any problem with the source file. Also I created a test which has the same encryption setup:
https://github.com/arekpalinski/ravendb/commit/9c90c242374d6f669c0154ca032ac7e96c9c56e3

Could you have a look and confirm that's the setup you have on your side? What is the size of your files? Does it happen every time or just occasionally?

Regards,
Arek

Srinivas Suravarapu

未讀,
2017年4月25日 上午9:06:392017/4/25
收件者:rav...@googlegroups.com
Hi Arek

Let me replicate this and send you a backup of the file system see if you find anything , I can reproduce it 2 of 3 times it works sometimes , may be a backup of the file system will help you see something 

--
You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/RzkS0Yzc0Go/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Scribestar Limited is a company registered in England and Wales. Registered number: 06935972. Registered office: 11th Floor, 88 Wood Street, London EC2V 7RS This message is private and confidential. If you have received this message in error please remove it from your system.  You must not disclose, copy or distribute the contents of this email or any attachments to any other person nor use its contents or the content in any attachments in any way or you may be acting unlawfully.

ar...@ayende.com

未讀,
2017年5月4日 凌晨2:26:232017/5/4
收件者:RavenDB - 2nd generation document database
Fixed in 3.5.4-patch-35199
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
回覆所有人
回覆作者
轉寄
0 則新訊息