From 8146901d941e19093212f3c6d6dc829acb4da08d Mon Sep 17 00:00:00 2001 From: Justin James Date: Thu, 21 Mar 2024 10:39:22 -0400 Subject: [PATCH] [#6610] Deprecated RBUDP. Deprecated rbudpRemLocCopy and svrPortalPutGetRbudp --- lib/api/src/rcDataObjCopy.cpp | 6 +++--- lib/api/src/rcDataObjGet.cpp | 6 +++--- lib/api/src/rcDataObjPut.cpp | 6 +++--- lib/api/src/rcDataObjRepl.cpp | 6 +++--- lib/core/include/irods/rodsKeyWdDef.h | 3 +++ lib/core/src/irods_parse_command_line_options.cpp | 2 +- lib/core/src/rcPortalOpr.cpp | 1 - server/core/include/irods/miscServerFunct.hpp | 6 ++---- server/core/src/miscServerFunct.cpp | 7 ++++++- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/api/src/rcDataObjCopy.cpp b/lib/api/src/rcDataObjCopy.cpp index 6811026e6d..a048763b19 100644 --- a/lib/api/src/rcDataObjCopy.cpp +++ b/lib/api/src/rcDataObjCopy.cpp @@ -59,11 +59,11 @@ * \n DEST_RESC_NAME_KW - The resource to store this data object * \n FILE_PATH_KW - The physical file path for this data object if the * normal resource vault is not used. - * \n RBUDP_TRANSFER_KW - use RBUDP for data transfer. This keyWd has no + * \n RBUDP_TRANSFER_KW - (Deprecated) use RBUDP for data transfer. This keyWd has no * value - * \n RBUDP_SEND_RATE_KW - the number of RBUDP packet to send per second + * \n RBUDP_SEND_RATE_KW - (Deprecated) the number of RBUDP packet to send per second * The default is 600000 - * \n RBUDP_PACK_SIZE_KW - the size of RBUDP packet. The default is 8192 + * \n RBUDP_PACK_SIZE_KW - (Deprecated) the size of RBUDP packet. The default is 8192 * * \return integer * \retval 0 on success diff --git a/lib/api/src/rcDataObjGet.cpp b/lib/api/src/rcDataObjGet.cpp index 508697ec7f..4491e59cb5 100644 --- a/lib/api/src/rcDataObjGet.cpp +++ b/lib/api/src/rcDataObjGet.cpp @@ -58,11 +58,11 @@ * \n FORCE_FLAG_KW - overwrite existing local copy. This keyWd has no value. * \n VERIFY_CHKSUM_KW - verify the checksum value of the local file after * the download. This keyWd has no value. - * \n RBUDP_TRANSFER_KW - use RBUDP for data transfer. This keyWd has no + * \n RBUDP_TRANSFER_KW - (Deprecated) use RBUDP for data transfer. This keyWd has no * value - * \n RBUDP_SEND_RATE_KW - the number of RBUDP packet to send per second + * \n RBUDP_SEND_RATE_KW - (Deprecated) the number of RBUDP packet to send per second * The default is 600000. - * \n RBUDP_PACK_SIZE_KW - the size of RBUDP packet. The default is 8192. + * \n RBUDP_PACK_SIZE_KW - (Deprecated) the size of RBUDP packet. The default is 8192. * \n LOCK_TYPE_KW - set advisory lock type. valid value - WRITE_LOCK_TYPE. * \param[in] locFilePath - the path of the local file to download. This path * can be a relative path. diff --git a/lib/api/src/rcDataObjPut.cpp b/lib/api/src/rcDataObjPut.cpp index 3440edef1b..700b6e1b0f 100644 --- a/lib/api/src/rcDataObjPut.cpp +++ b/lib/api/src/rcDataObjPut.cpp @@ -65,11 +65,11 @@ * \n VERIFY_CHKSUM_KW - verify and register the target checksum value * after the copy. The value is the md5 checksum value of the * local file. - * \n RBUDP_TRANSFER_KW - use RBUDP for data transfer. This keyWd has no + * \n RBUDP_TRANSFER_KW - (Deprecated) use RBUDP for data transfer. This keyWd has no * value. - * \n RBUDP_SEND_RATE_KW - the number of RBUDP packet to send per second + * \n RBUDP_SEND_RATE_KW - (Deprecated) the number of RBUDP packet to send per second * The default is 600000. - * \n RBUDP_PACK_SIZE_KW - the size of RBUDP packet. The default is 8192. + * \n RBUDP_PACK_SIZE_KW - (Deprecated) the size of RBUDP packet. The default is 8192. * \n LOCK_TYPE_KW - set advisory lock type. valid value - WRITE_LOCK_TYPE. * \param[in] locFilePath - the path of the local file to upload. This path * can be a relative path. diff --git a/lib/api/src/rcDataObjRepl.cpp b/lib/api/src/rcDataObjRepl.cpp index 4f0944dc34..4563463795 100644 --- a/lib/api/src/rcDataObjRepl.cpp +++ b/lib/api/src/rcDataObjRepl.cpp @@ -53,11 +53,11 @@ * This keyWd has no value. * \n FILE_PATH_KW - The physical file path for this data object if the * normal resource vault is not used. - * \n RBUDP_TRANSFER_KW - use RBUDP for data transfer. This keyWd has no + * \n RBUDP_TRANSFER_KW - (Deprecated) use RBUDP for data transfer. This keyWd has no * value. - * \n RBUDP_SEND_RATE_KW - the number of RBUDP packet to send per second + * \n RBUDP_SEND_RATE_KW - (Deprecated) the number of RBUDP packet to send per second * The default is 600000. - * \n RBUDP_PACK_SIZE_KW - the size of RBUDP packet. The default is 8192. + * \n RBUDP_PACK_SIZE_KW - (Deprecated) the size of RBUDP packet. The default is 8192. * \n LOCK_TYPE_KW - set advisory lock type. valid value - READ_LOCK_TYPE. * * \return integer diff --git a/lib/core/include/irods/rodsKeyWdDef.h b/lib/core/include/irods/rodsKeyWdDef.h index 0a58350dc8..800005eea3 100644 --- a/lib/core/include/irods/rodsKeyWdDef.h +++ b/lib/core/include/irods/rodsKeyWdDef.h @@ -73,9 +73,12 @@ #define ALL_MS_PARAM_KW "allMsParam" #define UNREG_COLL_KW "unregColl" #define UPDATE_REPL_KW "updateRepl" +// RBUDP_TRANSFER_KW has been deprecated #define RBUDP_TRANSFER_KW "rbudpTransfer" #define VERY_VERBOSE_KW "veryVerbose" +// RBUDP_SEND_RATE_KW has been deprecated #define RBUDP_SEND_RATE_KW "rbudpSendRate" +// RBUDP_PACK_SIZE_KW has been deprecated #define RBUDP_PACK_SIZE_KW "rbudpPackSize" #define ZONE_KW "zone" #define REMOTE_ZONE_OPR_KW "remoteZoneOpr" diff --git a/lib/core/src/irods_parse_command_line_options.cpp b/lib/core/src/irods_parse_command_line_options.cpp index 32632b3162..d04c8e1be5 100644 --- a/lib/core/src/irods_parse_command_line_options.cpp +++ b/lib/core/src/irods_parse_command_line_options.cpp @@ -40,7 +40,7 @@ static int parse_program_options( ("num_threads,N", po::value(), "numThreads - the number of threads to use for the transfer. A value of 0 means no threading. By default (-N option not used) the server decides the number of threads to use.") ("physical_path,p", po::value(), "physicalPath - the absolute physical path of the uploaded file on the server") ("progress,P", "output the progress of the upload.") - ("rbudp,Q", "use RBUDP (datagram) protocol for the data transfer") + ("rbudp,Q", "[Deprecated] use RBUDP (datagram) protocol for the data transfer") ("recursive,r", "recursive - store the whole subdirectory") ("dest_resc,R", po::value(), "resource - specifies the resource to store to. This can also be specified in your environment or via a rule set up by the administrator") ("ticket,t", po::value(), "ticket - ticket (string) to use for ticket-based access") diff --git a/lib/core/src/rcPortalOpr.cpp b/lib/core/src/rcPortalOpr.cpp index fc86ca68c9..97e03e651c 100644 --- a/lib/core/src/rcPortalOpr.cpp +++ b/lib/core/src/rcPortalOpr.cpp @@ -1282,7 +1282,6 @@ int getFileToPortalRbudp( int veryVerbose, int packetSize ) { - portList_t *myPortList; int status; rbudpReceiver_t rbudpReceiver; diff --git a/server/core/include/irods/miscServerFunct.hpp b/server/core/include/irods/miscServerFunct.hpp index ef87ad85c9..0bd4200fdb 100644 --- a/server/core/include/irods/miscServerFunct.hpp +++ b/server/core/include/irods/miscServerFunct.hpp @@ -71,8 +71,7 @@ int sameHostCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp ); void sameHostPartialCopy( portalTransferInp_t *myInput ); -int -rbudpRemLocCopy( dataCopyInp_t *dataCopyInp ); +[[deprecated("RBUDP is deprecated. Its use should be avoided.")]] int rbudpRemLocCopy(dataCopyInp_t* dataCopyInp); int remLocCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp ); void @@ -90,8 +89,7 @@ isUserPrivileged( rsComm_t *rsComm ); int intNoSupport( ... ); rodsLong_t longNoSupport( ... ); void getZoneServerId( char *zoneName, char *zoneSID ); -int -svrPortalPutGetRbudp( rsComm_t *rsComm ); +[[deprecated("RBUDP is deprecated. Its use should be avoided.")]] int svrPortalPutGetRbudp(rsComm_t* rsComm); void reconnManager( rsComm_t *rsComm ); int diff --git a/server/core/src/miscServerFunct.cpp b/server/core/src/miscServerFunct.cpp index dab7af7c73..d5e0d22067 100644 --- a/server/core/src/miscServerFunct.cpp +++ b/server/core/src/miscServerFunct.cpp @@ -439,7 +439,10 @@ svrPortalPutGet( rsComm_t *rsComm ) { if ( getUdpPortFromPortList( thisPortList ) != 0 ) { /* rbudp transfer */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" retVal = svrPortalPutGetRbudp( rsComm ); +#pragma clang diagnostic pop return retVal; } @@ -1319,7 +1322,6 @@ rbudpRemLocCopy( dataCopyInp_t *dataCopyInp ) { status = getFileToPortalRbudp( portalOprOut, NULL, FileDesc[destL3descInx].fd, veryVerbose, packetSize ); - } else { int srcL3descInx = dataOprInp->srcL3descInx; @@ -1361,7 +1363,10 @@ int remLocCopy(rsComm_t *rsComm, dataCopyInp_t *dataCopyInp) if ( getUdpPortFromPortList( &portalOprOut->portList ) != 0 ) { /* rbudp transfer */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return rbudpRemLocCopy( dataCopyInp ); +#pragma clang diagnostic pop } if ( numThreads > MAX_NUM_CONFIG_TRAN_THR || numThreads <= 0 ) {