Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform Google云存储| Artifactory不会删除bucket中的对象_Google Cloud Platform_Google Cloud Storage_Artifactory_Delete File - Fatal编程技术网

Google cloud platform Google云存储| Artifactory不会删除bucket中的对象

Google cloud platform Google云存储| Artifactory不会删除bucket中的对象,google-cloud-platform,google-cloud-storage,artifactory,delete-file,Google Cloud Platform,Google Cloud Storage,Artifactory,Delete File,我们目前正在GCP上设置一个artifactorypro实例,并希望使用GCS作为其文件存储。连接到bucket成功,通过Artifactory上传和下载到bucket和从bucket下载成功(使用通用repo) 但是:Artifactory不会删除工件,如果我们通过GUI告诉它的话。该工件被删除并在GUI中消失(垃圾箱在系统设置中被禁用),但仍存在于GCS中的存储桶中。 这是我们的binarystore.xml: <?xml version="1.0" encodin

我们目前正在GCP上设置一个artifactorypro实例,并希望使用GCS作为其文件存储。连接到bucket成功,通过Artifactory上传和下载到bucket和从bucket下载成功(使用通用repo)

但是:Artifactory不会删除工件,如果我们通过GUI告诉它的话。该工件被删除并在GUI中消失(垃圾箱在系统设置中被禁用),但仍存在于GCS中的存储桶中。

这是我们的binarystore.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config version="v1">
<chain>
   <provider id="cache-fs" type="cache-fs">
       <provider id="eventual" type="eventual">
           <provider id="retry" type="retry">
               <provider id="google-storage" type="google-storage"/>
           </provider>
       </provider>
   </provider>
</chain>

<provider id="google-storage" type="google-storage">
   <endpoint>commondatastorage.googleapis.com</endpoint>
    <bucketName>rtfdev</bucketName>
   <identity>xxx</identity>
   <credential>xxx</credential>
   <bucketExists>false</bucketExists>
   <httpsOnly>true</httpsOnly>
   <httpsPort>443</httpsPort>
</provider>
</config>

commondatastorage.googleapis.com
rtfdev
xxx
xxx
假的
真的
443
我们的设置:

  • 人工7.12.6
  • 操作系统:Debian10(buster)
  • 机器类型:e2-highcpu-4(4个VCPU,4 GB内存)
  • 磁盘:200 GB SSD
问题是:

  • 这是否按预期工作?Artifactory从不删除存储桶中的工件吗
  • 一个相关的注意事项是:我们如何说服Artifactory在与GCS的交互中更加详细?(artifactorybinarystore.log可疑为空,
    console.log
    也安静…)

您没有看到从存储中立即删除工件的原因是,工件正在使用。
TL;DR-一旦进程将其删除,您将看到从存储中删除的工件

Artifactory只存储一次任何二进制文件。这就是我们所说的“一次性存储”。第一次上载文件时,Artifactory在存储文件时运行所需的校验和计算,但是,如果再次上载文件(例如,上载到其他位置),则上载将作为一个简单的数据库事务来实现,该事务创建另一条将文件校验和映射到其新位置的记录。无需将文件再次实际存储在存储器中。无论文件上载多少次,文件存储区都只承载该文件的一个副本。

删除文件也是一个简单的数据库事务,其中删除了相应的数据库记录。即使删除了指向该文件的最后一个数据库条目,也不会直接删除该文件本身。所谓的“孤立”文件在后台被Artifactory的垃圾收集过程删除。

您没有看到该工件立即从存储中删除的原因是Artifactory正在使用一个 TL;DR-一旦进程将其删除,您将看到从存储中删除的工件

Artifactory只存储一次任何二进制文件。这就是我们所说的“一次性存储”。第一次上载文件时,Artifactory在存储文件时运行所需的校验和计算,但是,如果再次上载文件(例如,上载到其他位置),则上载将作为一个简单的数据库事务来实现,该事务创建另一条将文件校验和映射到其新位置的记录。无需将文件再次实际存储在存储器中。无论文件上载多少次,文件存储区都只承载该文件的一个副本。
删除文件也是一个简单的数据库事务,其中删除了相应的数据库记录。即使删除了指向该文件的最后一个数据库条目,也不会直接删除该文件本身。所谓的“孤立”文件是通过Artifactory的垃圾收集过程在后台删除的。