mirror of
				https://gitea.com/actions/cache.git
				synced 2025-10-29 07:47:12 +00:00 
			
		
		
		
	Test out higher concurrency limits
This commit is contained in:
		
							
								
								
									
										2
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -1622,7 +1622,7 @@ function uploadFile(restClient, cacheId, archivePath) { | |||||||
|         const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); |         const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); | ||||||
|         const responses = []; |         const responses = []; | ||||||
|         const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? |         const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? | ||||||
|         const concurrency = 4; // # of HTTP requests in parallel |         const concurrency = 8; // # of HTTP requests in parallel | ||||||
|         const threads = [...new Array(concurrency).keys()]; |         const threads = [...new Array(concurrency).keys()]; | ||||||
|         core.debug("Awaiting all uploads"); |         core.debug("Awaiting all uploads"); | ||||||
|         let offset = 0; |         let offset = 0; | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -1622,7 +1622,7 @@ function uploadFile(restClient, cacheId, archivePath) { | |||||||
|         const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); |         const resourceUrl = getCacheApiUrl() + "caches/" + cacheId.toString(); | ||||||
|         const responses = []; |         const responses = []; | ||||||
|         const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? |         const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? | ||||||
|         const concurrency = 4; // # of HTTP requests in parallel |         const concurrency = 8; // # of HTTP requests in parallel | ||||||
|         const threads = [...new Array(concurrency).keys()]; |         const threads = [...new Array(concurrency).keys()]; | ||||||
|         core.debug("Awaiting all uploads"); |         core.debug("Awaiting all uploads"); | ||||||
|         let offset = 0; |         let offset = 0; | ||||||
|   | |||||||
| @@ -181,7 +181,7 @@ async function uploadFile(restClient: RestClient, cacheId: number, archivePath: | |||||||
|     const responses: IRestResponse<void>[] = []; |     const responses: IRestResponse<void>[] = []; | ||||||
|     const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? |     const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too? | ||||||
|  |  | ||||||
|     const concurrency = 4; // # of HTTP requests in parallel |     const concurrency = 8; // # of HTTP requests in parallel | ||||||
|     const threads = [...new Array(concurrency).keys()]; |     const threads = [...new Array(concurrency).keys()]; | ||||||
|     core.debug("Awaiting all uploads"); |     core.debug("Awaiting all uploads"); | ||||||
|     let offset = 0; |     let offset = 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Josh Gross
					Josh Gross